共用方式為


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

屬性值

此性質對所有陣列皆 true 適用。

實作

備註

Array 實作此 IsFixedSize 特性是因為介面要求 System.Collections.IList

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

取得此性質的值為 O(1) 運算。

適用於

另請參閱