PasswordBox.Clear Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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.