PasswordBox.Clear メソッド

定義

Password プロパティの値を消去します。

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

次の例は、 メソッドを使用して を PasswordBox クリアする方法を Clear 示しています。

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()

注釈

プロパティの値は、PasswordEmptyこのメソッドの呼び出し後です。

適用対象