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

Definition

Genererar ett NotSupportedException undantag i alla fall.

 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

Parametrar

item
TKey

Objektet som ska tas bort från samlingen.

Returer

trueom item har tagits bort från samlingen, annars . false Den här metoden returnerar false även om item den inte finns i den ursprungliga samlingen.

Implementeringar

Undantag

I samtliga fall.

Kommentarer

Den här medlemmen är en explicit implementering av gränssnittsmedlemmar. Den kan endast användas när instansen ReadOnlyDictionary<TKey,TValue>.KeyCollection skickas till ett ICollection<T> gränssnitt. Gränssnittet ICollection<T> anger att Remove metoden ska utlösa ett NotSupportedException undantag om samlingen som implementerar gränssnittet är skrivskyddad.

Gäller för