DataColumn Constructor ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

public:
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: