ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Remove Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
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.