luni, 25 august 2014

Add Columns to DataTable C#

Using Columns collection we can add columns to DataTable in runtime.

Example: 

DataTable dt = new DataTable("Product");
dt.Columns.Add("id",typeof(Int32));
dt.Columns.Add("name",typeof(string));

Niciun comentariu:

Trimiteți un comentariu