c#初学者?
来源:百度知道 编辑:UC知道 时间:2024/05/25 18:51:02
我想知道 this.textbox.text=true
this.textbox.text=false;
的作用?
this.textbox.text=false;
的作用?
作用就是出错啦
this.textbox.text只能等于字符型
而true和false都是布尔值
你可以这样写
this.textbox.text="true";
加上双引号就是字符串啦。
类型明显不匹配,一个接受的是string类型,一个是bool类型。
this.textbox.text=true
this.textbox.text=false;
下面这个还可以运行。。
this.textbox.text="true"
this.textbox.text="false";
意思呢就是,在前台textbox(输入框)里面显示 true 和false 这两个单词
true和false是boolen类型
而this.textbox.text是要获得string类型
如果这样写:this.textbox.text=true
this.textbox.text=false;是错误的
我不认为你这种写法是对的。
textBox.text只能用string类型赋值
this.textbox.text.visible=true可以