Here is a simple example to add values to DataTable
DataTable dt = new DataTable();
//Adding Columns and names
dt.Columns.Add("ID" ,typeof(int));
dt.Columns.Add("Name",typeof(string));
//Adding Rows and values
dt.Rows.Add(1,"anish");
dt.Rows.Add(2,"marokey");
No comments:
Post a Comment