The DataColumn Class

The DataColumn class is used to store the metadata about each column. Metadata is information that describes the data in the table. This class includes properties such as the data type, column name, and data size. Each DataTable contains a collection of DataColumn objects (an instance of DataColumnCollection) accessible through the Columns property.

The Columns Collection

The DataColumnCollection class has properties and methods of its own for managing the collection of columns it contains. These include the Count property, and methods for adding/deleting members of the collection. Let’s look at some of the properties and methods.

  • Count— The number of items in the collection.

  • Item— Returns the DataColumn object at the ...

Get ADO.NET Programming in Visual Basic™ .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.