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

属性值

如果为只读,则为 否则为 /&;。 在默认实现中 SortedDictionary<TKey,TValue>.ValueCollection,此属性始终返回 false

实现

注解

只读集合不允许在创建集合后添加、删除或修改元素。

获取此属性的值是 O(1) 操作。

适用于