Array.IsFixedSize 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會得到一個值,表示 是否 Array 具有固定大小。
public:
property bool IsFixedSize { bool get(); };
public:
virtual property bool IsFixedSize { bool get(); };
public bool IsFixedSize { get; }
public virtual bool IsFixedSize { get; }
member this.IsFixedSize : bool
Public ReadOnly Property IsFixedSize As Boolean
Public Overridable ReadOnly Property IsFixedSize As Boolean
屬性值
此性質對所有陣列皆 true 適用。
實作
備註
Array 實作此 IsFixedSize 特性是因為介面要求 System.Collections.IList 。
固定大小的陣列在陣列建立後不允許新增或移除元素,但允許修改現有元素。
取得此性質的值為 O(1) 運算。