在VB.NET中我写这样的代码dim a as string = me.textbox1.text
dim b as bool=false
me.textbox1.readonly=trueif a="条件1成立" then b=true
me.textbox1.readonly=falseend if在C#中怎么实现?主要是在达到条件后把布尔型的FALSE改成TRUE.
dim b as bool=false
me.textbox1.readonly=trueif a="条件1成立" then b=true
me.textbox1.readonly=falseend if在C#中怎么实现?主要是在达到条件后把布尔型的FALSE改成TRUE.
解决方案 »
- 想学C#,请问有没有入门的书可以介绍下呢?
- c# -Windows Mobile下HttpWebRequest请求几次后死掉,不能再发出请求
- 各位大哥大姐,谁知道执行了Button1_Click时间怎么又去执行了(!IsPostBack)时间?
- 根据dataset动态创建rdlc报表
- 如何将Arraylist转换成int数组?
- 【求助】怎样把数据库中的图片保存到XML,怎样把XML中的图片保存到数据库,很急!!!!
- C#文本搜索
- 自己使用new 来实例化的对象,是否都要自己dispose啊?
- 我是名新手,请猛将兄们多多帮忙
- DEV控件,这种触屏的风格是怎么做的?
- combobox的值变化事件
- 绘图的原理!!!
bool b=false;
this.textbox1.readonly=true ;if (a=="条件1成立" )
{
b=true ;
this.textbox1.readonly=false;
}
bool b=false;
this.textbox1.readonly=true;if (a=="条件1成立" )
{
b=true;
this.textbox1.readonly=false;
}
string a = this.textbox1.text;
bool b=false;
this.textbox1.readonly=true; if (a.Equals("条件1成立" ))
{
b=true;
this.textbox1.readonly=false;
} 字符串相等不用==