帮忙写个循环
DataSet ds=new DataSet();DataTable tableEmp=new DataTable("employee");
tableEmp.Columns.Add("ID",typeof(int));
tableEmp.Columns.Add("Name",typeof(string));
ds.Tables.Add(tableEmp);
//从这里开始如何写个循环,而不用写成下面这么复杂?
DataRow row1=tableEmp.NewRow();
row1["ID"]=0001;
row1["Name"]="Joe Users";
tableEmp.Rows.Add(row1);
DataRow row2=tableEmp.NewRow();
row2["ID"]=0002;
row2["Name"]="A2";
tableEmp.Rows.Add(row2);
DataRow row3=tableEmp.NewRow();
row3["ID"]=0003;
row3["Name"]="A1";
tableEmp.Rows.Add(row3);
DataRow row4=tableEmp.NewRow();
row4["ID"]=0003;
row4["Name"]="AAA";
tableEmp.Rows.Add(row4);
this.DataGrid1.DataSource=ds;
this.DataGrid1.DataBind();
如何写一个row1-row4的循环啊?