DataColumn Constructor ()
.NET Framework (current version)
Initializes a new instance of a DataColumn class as type string.
Assembly: System.Data (in System.Data.dll)
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.
.NET Framework
Available since 1.1
Available since 1.1
Show: