How to add columns in DataTable?

 Posted by vishalneeraj-24503 on 12/20/2013 | Category: ADO.NET Interview questions | Views: 2180 | Points: 40

DataTable has Columns property and Columns has Add static method,so with the help of Add method we can add any columns into DataTable.

For Example:-

DataTable dt_employee = new DataTable();


Here,Employee_Code and Employee_Name will be treated as DataTable Columns.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response