Dictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.IsReadOnly Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob das ICollection<T> schreibgeschützt ist.

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

Eigenschaftswert

true, wenn das ICollection<T> schreibgeschützt ist, andernfalls false. In der Standardimplementierung von Dictionary<TKey,TValue>.KeyCollection gibt diese Eigenschaft immer true zurück.

Implementiert

Hinweise

Eine schreibgeschützte Auflistung gestattet nach dem Erstellen der Auflistung weder das Hinzufügen noch das Ändern oder Entfernen von Elementen.

Das Abrufen des Werts dieser Eigenschaft ist ein O(1)-Vorgang.

Gilt für: