Array.IsFixedSize Array.IsFixedSize Array.IsFixedSize Array.IsFixedSize Property

定義

取得值,指出 Array 是否有固定的大小。Gets a value indicating whether the Array has a fixed size.

public:
 property bool IsFixedSize { bool get(); };
public bool IsFixedSize { get; }
member this.IsFixedSize : bool
Public ReadOnly Property IsFixedSize As Boolean

屬性值

所有陣列的這個屬性一律會是 trueThis property is always true for all arrays.

實作

備註

Array 會實作IsFixedSize屬性因為它需要System.Collections.IList介面。Array implements the IsFixedSize property because it is required by the System.Collections.IList interface.

具有固定大小陣列不允許新增或移除項目之後,在建立陣列,但它可讓您修改現有的項目。An array with a fixed size does not allow the addition or removal of elements after the array is created, but it allows the modification of existing elements.

擷取這個屬性的值是一種 O(1) 運算。Retrieving the value of this property is an O(1) operation.

適用於

另請參閱