PasswordBox.Clear Metoda

Definicja

Czyści wartość Password właściwości.

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

Przykłady

W poniższym przykładzie pokazano, jak wyczyścić element PasswordBox za pomocą Clear metody .

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()

Uwagi

Wartość Password właściwości jest Empty po wywołaniu tej metody.

Dotyczy