How to get only column names from dataset in an single array of string using c#
Dataset has 17 tables, tables may have different schemas.
From comments
string[] names = ds.Tables.Cast<DataTable>() .SelectMany(x => x.Columns.Cast<DataColumn>() .Select(y => y.ColumnName) ).ToArray();
1.4m articles
1.4m replys
5 comments
57.0k users