PasswordBox.Clear Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Rensar värdet för Password egenskapen.
public:
void Clear();
public void Clear();
member this.Clear : unit -> unit
Public Sub Clear ()
Exempel
I följande exempel visas hur du rensar en PasswordBox med Clear -metoden.
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()
Kommentarer
Värdet för egenskapen Password är Empty efter ett anrop till den här metoden.