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) 操作。