摘要: //把DataTable的某一列转化为逗号分隔字符串 private static string DataTableColumnSplit(DataTable dataTable,string strColumn) { int[] idInts = dataTable.AsEnumerable().Select(d => d.Field(strColumn)).ToArray(); ... 阅读全文
posted @ 2019-03-13 22:42 zhaogaojian 阅读(3028) 评论(0) 推荐(1) 编辑
摘要: DataTable dtNew = new DataTable(); dtNew.Columns.Add("ColumnName", typeof(string)); for (int i = 0; i < dt.Rows.Count; i++) { dtNew.Columns.Add("Column" + (i + 1).T... 阅读全文
posted @ 2019-03-13 22:30 zhaogaojian 阅读(900) 评论(0) 推荐(0) 编辑