2020-03-14 每日一例第7天
1.新建窗体windowform,修改text值;
2.两个按钮后台代码:
private void button1_Click(object sender, EventArgs e)
{
//转为字符串
textBox1.PasswordChar =(char)0;
}
private void button2_Click(object sender, EventArgs e)
{
//转为密码框
textBox1.PasswordChar = ‘*‘;
}
3.例题完成,最后效果如下: