ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Clear Metoda

Definice

NotSupportedException Vyvolá výjimku ve všech případech.

 virtual void System.Collections.Generic.ICollection<TKey>.Clear() = System::Collections::Generic::ICollection<TKey>::Clear;
void ICollection<TKey>.Clear ();
abstract member System.Collections.Generic.ICollection<TKey>.Clear : unit -> unit
override this.System.Collections.Generic.ICollection<TKey>.Clear : unit -> unit
Sub Clear () Implements ICollection(Of TKey).Clear

Implementuje

Výjimky

Ve všech případech

Poznámky

Tento člen je explicitní implementace členu rozhraní. Lze ho ReadOnlyDictionary<TKey,TValue>.KeyCollection použít pouze v případě, že je instance přetypována do ICollection<T> rozhraní. Rozhraní ICollection<T> určuje, že metoda by měla vyvolat NotSupportedException výjimku, Clear pokud kolekce, která implementuje rozhraní, je jen pro čtení.

Platí pro