Search This Blog

Sunday, November 10, 2013

DataTable C#

C# > System.Data   > DataTable

DataTable is a table in memory data.
When accessing DataTable objects in DataSet they are case sensitive.
We can display data from it  in controls such as DataGridView.

Properties:

Columns:         collection of columns
Rows:              collection of rows
DefaultView:   customized view of the table that may include a filtered view, or a cursor position.


Example:

   Create a new DataTable   

    System.Data.DataTable table = new DataTable("myTable");

Other examples: