I was wondering how I could get the columns of a database table and store each of them in a string or string array. I have the following code but I believe it does not work.
Very Simply U can do it like below code..
DataTable table = new DataTable(); foreach (DataColumn column in table .Columns) { Console.Write("Item: "); Console.Write(column.ColumnName); Console.Write(" "); Console.WriteLine(row[column]); }