DataTable dt = FormatDT(ds); dt.Columns.Cast<DataColumn>().AsEnumerable().ToList().ForEach(d => { dt.AsEnumerable().ToList().ForEach(row => { Log.WriteLog(d.Caption, row[d.Caption].ToString()); } ); } );
d.Caption //列名
row[d.Caption] //value