Język

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

Definicja

Zgłasza wyjątek NotSupportedException we wszystkich przypadkach.

 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

Wyjątki

We wszystkich przypadkach.

Uwagi

Ten element członkowski jest jawną implementacją składową interfejsu. Można go używać tylko wtedy, gdy ReadOnlyDictionary<TKey,TValue>.KeyCollection wystąpienie jest rzutowanie do interfejsu ICollection<T> . Interfejs ICollection<T> określa, że Clear metoda powinna zgłaszać NotSupportedException wyjątek, jeśli kolekcja implementujący interfejs jest tylko do odczytu.

Dotyczy