PropertyCollection.IDictionary.Clear Metod

Definition

Tar bort alla element från objektet IDictionary .

 virtual void System.Collections.IDictionary.Clear() = System::Collections::IDictionary::Clear;
void IDictionary.Clear();
abstract member System.Collections.IDictionary.Clear : unit -> unit
override this.System.Collections.IDictionary.Clear : unit -> unit
Sub Clear () Implements IDictionary.Clear

Implementeringar

Undantag

Objektet IDictionary är skrivskyddat.

Exempel

I följande exempel visas hur du implementerar Clear metoden. Det här exemplet är en del av ett större exempel som tillhandahålls IDictionary för klassen.

public void Clear() { ItemsInUse = 0; }
Public Sub Clear() Implements IDictionary.Clear
    ItemsInUse = 0
End Sub

Gäller för