Represents a collection of System.Data.DataColumn objects for a System.Data.DataTable.
See Also: DataColumnCollection Members
The System.Data.DataColumnCollection defines the schema of a System.Data.DataTable, and determines what kind of data each System.Data.DataColumn can contain. You can access the System.Data.DataColumnCollection through the DataTable.Columns property of the System.Data.DataTable object.
The System.Data.DataColumnCollection uses the DataColumnCollection.Add(DataColumn) and DataColumnCollection.Remove(DataColumn) methods to insert and delete System.Data.DataColumn objects. Use the InternalDataCollectionBase.Count property to determine how many System.Data.DataColumn objects are in the collection. Use the DataColumnCollection.Contains(string) method to verify whether a specified index or column name exists in the collection.