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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access