CollectionBase.IList.IsReadOnly 屬性

定義

取得值,指出 CollectionBase 是否唯讀。

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

屬性值

如果 true 是唯讀,則為 CollectionBase,否則為 false。 預設為 false

實作

備註

唯讀的集合不允許在集合建立後增加、移除或修改項目。

只讀的集合只是含有防止修改集合之包裝函式的集合;因此,如果對基礎集合進行變更,只讀集合會反映這些變更。

擷取這個屬性的值是 O(1) 作業。

適用於