DataTable MyDataTable = new DataTable();
MyDataTable.Columns.Add(new DataColumn("学生编号", typeof(string)));
MyDataTable.Columns.Add(new DataColumn("姓名", typeof(string)));
MyDataTable.Columns.Add(new DataColumn("学校", typeof(string)));
MyDataTable.Columns.Add(new DataColumn("联系电话", typeof(string)));
MyDataTable.Columns.Add(new DataColumn("家庭住址", typeof(string)));
DataRow dr;
for (int i = 0; i <= 10; i++)
{
dr = MyDataTable.NewRow();
dr["学生编号"] = Guid.NewGuid().ToString();
dr["姓名"] = "222";
dr["学校"] = "444";
dr["联系电话"] = "555";
dr["家庭住址"] = "666";
MyDataTable.Rows.Add(dr);
}