构造DataTable

System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.Add("ColumnName1", typeof(String));
dt.Columns.Add("ColumnName2", typeof(Int32));
然后再添加行。
dt.Rows.Add(new Object[] { ... });
posted @ 2013-01-28 20:55  门对夕阳  阅读(167)  评论(0编辑  收藏  举报