語言

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

定義

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

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

屬性值

true若 為ICollection<T>唯讀;否則 。 false 在 的 SortedDictionary<TKey,TValue>.ValueCollection預設實作中,此性質總是回傳 false。

實作

備註

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

取得此性質的值需進行 O(1) 運算。

適用於