首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

this.comboBox1.Text = ? 疏失

2012-10-28 
this.comboBox1.Text ? 出错string knameOKif (LableNode.ChildNodes[0].InnerText 0)//条件1{

this.comboBox1.Text = ? 出错
 
string kname="OK";

if (LableNode.ChildNodes[0].InnerText == "0")//条件1
 {
  this.comboBox1.Text = Kname;//正常
  this.textBox1.Text = tx2;
 }
 if (this.comboBox1.Text == "")//条件2
{
  this.comboBox1.Text = Kname;//出错,“未将对象引用设置到对象实例”
  this.textBox1.Text = tx2;
}

这里很奇怪,以前编译没出现问题,今天这里出错了。

[解决办法]
一般这种错误。 自己设置断点调试下就好了。
[解决办法]
2个条件语句完全一样啊,为什么不写在一起。。

热点排行