ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Remove Methode

Definition

Löst in allen Fällen eine NotSupportedException Ausnahme aus.

 virtual bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) = System::Collections::Generic::ICollection<TKey>::Remove;
bool ICollection<TKey>.Remove(TKey item);
abstract member System.Collections.Generic.ICollection<TKey>.Remove : 'Key -> bool
override this.System.Collections.Generic.ICollection<TKey>.Remove : 'Key -> bool
Function Remove (item As TKey) As Boolean Implements ICollection(Of TKey).Remove

Parameter

item
TKey

Das Objekt, das aus der Auflistung entfernt werden soll.

Gibt zurück

true if item was successfully removed from the collection; otherwise, false. Diese Methode gibt auch zurück false , wenn item in der ursprünglichen Auflistung nicht gefunden wird.

Implementiert

Ausnahmen

In allen Fällen.

Hinweise

Dieses Element ist eine explizite Schnittstellenmitgliedsimplementierung. Sie kann nur verwendet werden, wenn die ReadOnlyDictionary<TKey,TValue>.KeyCollection Instanz in eine ICollection<T> Schnittstelle umgegossen wird. Die ICollection<T> Schnittstelle gibt an, dass die Remove Methode eine NotSupportedException Ausnahme auslösen soll, wenn die Auflistung, die die Schnittstelle implementiert, schreibgeschützt ist.

Gilt für: