PasswordBox.Clear Méthode

Définition

Efface la valeur de la propriété Password.

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

Exemples

L’exemple suivant montre comment effacer un PasswordBox avec la Clear méthode .

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

Remarques

La valeur de la Password propriété est Empty après un appel à cette méthode.

S’applique à