PasswordBox.Clear 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
清除 Password 屬性的值。
public:
void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()
範例
下列範例示範如何使用 方法清除 PasswordBoxClear 。
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 呼叫這個方法之後。