Array.IsFixedSize 屬性

定義

取得值,指出 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

屬性值

Boolean

所有陣列的這個屬性一律會是 true

實作

備註

Array 會實作 IsFixedSize 屬性,因為 介面需要 System.Collections.IList 屬性。

具有固定大小的陣列不允許在建立陣列之後加入或移除元素,但允許修改現有的元素。

擷取這個屬性的值是一種 O(1) 運算。

適用於

另請參閱