Array.IsFixedSize 属性

定义

获取一个值,该值指示 Array 是否具有固定大小。Gets a value indicating whether the Array has a fixed size.

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

属性值

对于所有数组,此属性始终为 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.

适用于

另请参阅