SortedDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.IsReadOnly 屬性

定義

取得值,指出 ICollection<T> 是否唯讀。

property bool System::Collections::Generic::ICollection<TKey>::IsReadOnly { bool get(); };
bool System.Collections.Generic.ICollection<TKey>.IsReadOnly { get; }
member this.System.Collections.Generic.ICollection<TKey>.IsReadOnly : bool
 ReadOnly Property IsReadOnly As Boolean Implements ICollection(Of TKey).IsReadOnly

屬性值

如果 true 是唯讀,則為 ICollection<T>,否則為 false。 在 SortedDictionary<TKey,TValue>.KeyCollection 的預設實作中,這個屬性一律會傳回 false

實作

備註

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

取得此屬性的值是 O (1) 作業。

適用於