System.Data Namespace DataTable Class
Initializes a new instance of the DataTable class with no arguments.
[ VB ]
Public Sub New ( )
[ C# ]
public DataTable ( );
[ C++ ]
public: DataTable ( );
[ JScript ]
public function DataTable ( );
The following table shows inital property values for an instance of DataTable initialized with this constructor.
Property |
Default Value |
CaseSensitive |
Same as the parent DataSet, if it belongs to one. Otherwise, false. |
DisplayExpression |
Empty String ( "" ) |
Locale |
Same as the parent DataSet object's CultureInfo ( returned by the Locale property ); if no parent exists, the default is the current system CultureInfo. |
MinimumCapacity |
25 rows. |
You can change the value for any of these properties through a separate call to the property.
The following example initializes a new DataTable, adds several DataColumn objects that accommodate varying data types, adds a given number of DataRow objects, then displays it in a DataGrid control.
Show me
DataTable Members DataTable Constructor Overload List DataColumn DataRow DataView