DataColumn Constructor

DataColumn Constructor ()

 

Initializes a new instance of a DataColumn class as type string.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

new : unit -> DataColumn

When created, a DataColumn object has no default ColumnName or Caption. When you add it to a DataColumnCollection, a default name ("Column1", "Column2", and so on) will be generated if a name has not been assigned to the ColumnName.

The following example creates a new DataColumn, sets various properties, and adds it to a DataColumnCollection for the DataTable object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft