List<T>.IList.IsFixedSize List<T>.IList.IsFixedSize List<T>.IList.IsFixedSize Property


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

property bool System::Collections::IList::IsFixedSize { bool get(); };
bool System.Collections.IList.IsFixedSize { get; }
 ReadOnly Property IsFixedSize As Boolean Implements IList.IsFixedSize


如果 true 有固定大小,則為 IList,否則為 falsetrue if the IList has a fixed size; otherwise, false. List<T> 的預設實作中,這個屬性永遠會傳回 falseIn the default implementation of List<T>, this property always returns false.



具有固定大小的集合不允許在集合建立後新增或移除項目,但允許對現有項目進行修改。A collection with a fixed size does not allow the addition or removal of elements after the collection is created, but it allows the modification of existing elements.

具有固定大小的集合只是具有包裝函式的集合, 可防止新增和移除專案;因此, 如果對基礎集合進行了變更, 包括新增或移除元素, 則固定大小集合會反映這些變更。A collection with a fixed size is simply a collection with a wrapper that prevents adding and removing elements; therefore, if changes are made to the underlying collection, including the addition or removal of elements, the fixed-size collection reflects those changes.

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