Creating datatable in Dot Net

Puneet20884
Posted by Puneet20884 under C# category on | Views : 2488
The sample self explanatory code goes as:

  
DataTable dt = new DataTable("News");
dt.Columns.Add("DateAdded", Type.GetType("System.String"));
dt.Columns.Add("Description", Type.GetType("System.String"));
dt.Columns.Add("OnHome", Type.GetType("System.Boolean"));

Comments or Responses

Login to post response