語言

StringCollection.IList.IsReadOnly 屬性

定義

會取得一個值,表示該物件是否 StringCollection 為唯讀。

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若物件StringCollection為唯讀;否則 。 false 預設值為 false。

實作

備註

唯讀的集合在建立集合後不允許新增、移除或修改元素。

唯讀集合就是帶有封裝器,禁止修改集合;因此,若對底層集合進行變更,唯讀收藏會反映這些變更。

取得此性質的值為 O(1) 運算。

適用於