string[] columnNames = dt.Columns.Cast() .Select(x => x.ColumnName) .ToArray();