//获得dataTable的key值 List<string> keyList = new List<string>(); for (int i = 0; i < dt.Columns.Count; i++) { keyList.Add(dt.Columns[i].ColumnName); }