PasswordBox.Clear 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
清除 Password 属性的值。
public:
void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()
示例
以下示例演示如何使用 Clear 方法清除 PasswordBox 。
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()
注解
属性的值 Password 是在 Empty 调用此方法之后。