1
2
3
4
5
6
7
|
//三种都是清空
this
.textBox1.PasswordChar =
new
char
();
this
.textBox1.PasswordChar =
'\0'
;
this
.textBox1.PasswordChar =
default
(
char
);
|
1
2
3
4
5
|
把TextBox的TextMode属性改回 默认的SingleLine就行了啊。
要设为密码属性的代码:TextBox1.TextMode = TextBoxMode.Password
要取消密码属性的代码:TextBox1.TextMode = TextBoxMode.SingLine(SingLine为默认属性)
|