int age = 0;foreach(DataRow row in table.Rows){ if(row["id"].ToString() == "2") { age = Convert.ToInt32(row["age"].ToString()); break; }}现在age就等于20了