Want to display a dataTable in C#. I am using : "using System.Data" as a directive. Where am I going wrong?
DataTable dt0 = new DataTable();
dt0.Columns.Add("", typeof(string));
dt0.Columns.Add("Sun", typeof(double));
dt0.Columns.Add("Mercury", typeof(double));
dt0.Columns.Add("Venus", typeof(double));
dt0.Columns.Add("EMB", typeof(double));
dt0.Columns.Add("Mars", typeof(double));
dt0.Columns.Add("Jupiter", typeof(double));
dt0.Columns.Add("Saturn", typeof(double));
dt0.Columns.Add("Uranus", typeof(double));
dt0.Columns.Add("Neptune", typeof(double));
dt0.Columns.Add("Pluto", typeof(double));
dt0.Columns.Add("Moon", typeof(double));
dt0.Rows.Add("Xecl", Xecl[0], Xecl[1], Xecl[2], Xecl[3], Xecl[4], Xecl[5], Xecl[6], Xecl[7], Xecl[8], Xecl[9], Xecl[10]);
dt0.Rows.Add("Yecl", Yecl[0], Yecl[1], Yecl[2], Yecl[3], Yecl[4], Yecl[5], Yecl[6], Yecl[7], Yecl[8], Yecl[9], Yecl[10]);
dt0.Rows.Add("Zecl", Zecl[0], Zecl[1], Zecl[2], Zecl[3], Zecl[4], Zecl[5], Zecl[6], Zecl[7], Zecl[8], Zecl[9], Zecl[10]);
dt0.Rows.Add("Recl", Recl[0], Recl[1], Recl[2], Recl[3], Recl[4], Recl[5], Recl[6], Recl[7], Recl[8], Recl[9], Recl[10]);
DataView dv = new DataView(dt0);
What I have tried:
Not printing out the datatable. I have 12 columns of data to be printed out.