PasswordBox.Clear Method ()
.NET Framework (current version)
Clears the value of the Password property.
PresentationFramework (in PresentationFramework.dll)
The value of the Password property is Empty after a call to this method.
The following example shows how to clear a PasswordBox with the Clear method.
PasswordBox pwdBox = new PasswordBox();
pwdBox.Password = "Open Sesame!";
// Clear any contents of the PasswordBox, as well as the value stored in the Password property.
Return to top
Available since 3.0