DataTable table;
//获取数据for( int i=0;i<table.Rows.Count;i++ )
{
  DataRow row = table.Rows[i];
  if( row["A"].ToString()=="ABC" )
    row["B"] = "SomeValue";
}

解决方案 »

  1.   

    非常感谢 timmy3310(tim)
    还有一个问题
    这句  if( row["A"].ToString()=="ABC" ) and ( row["c"].ToString()=="123" )
    两个条件应该怎么写? 与运算符和或运算符分别是什么呢?
      

  2.   

    还有一个问题,
    this.button1.Click += new System.EventHandler(this.button1_Click);
    那个+=是什么运算?干什么用的?
      

  3.   

    string test1;
    string test2;test1 = test1 + test2test1 += test2
      

  4.   

    if( row["A"].ToString()=="ABC" ) and ( row["c"].ToString()=="123" )
    ->
    if( (row["A"].ToString()=="ABC") && (row["C"].ToString()=="123") )and -> &&
    or  -> ||a += 2 -> a = a+2this.button1.Click += new System.EventHandler(this.button1_Click);
    的意思是给button1的Click事件增加一个处理方法