Freigeben über


PasswordBox.Clear Methode

Definition

Löscht den Wert der Password Eigenschaft.

public:
 void Clear();
public void Clear();
member this.Clear : unit -> unit
Public Sub Clear ()

Beispiele

Das folgende Beispiel zeigt, wie sie eine PasswordBox mit der Clear Methode löschen.

PasswordBox pwdBox = new PasswordBox();
pwdBox.Password = "Open Sesame!";

// Clear any contents of the PasswordBox, as well as the value stored in the Password property.
pwdBox.Clear();
Dim pwdBox As New PasswordBox()
pwdBox.Password = "Open Sesame!"

' Clear any contents of the PasswordBox, as well as the value stored in the Password property.
pwdBox.Clear()

Hinweise

Der Wert der Password Eigenschaft liegt Empty nach einem Aufruf dieser Methode.

Gilt für: