See Also: DataTable Members
When accessing System.Data.DataTable objects, note that they are conditionally case sensitive. For example, if one System.Data.DataTable is named "mydatatable" and another is named "Mydatatable", a string used to search for one of the tables is regarded as case sensitive. However, if "mydatatable" exists and "Mydatatable" does not, the search string is regarded as case insensitive. A System.Data.DataSet can contain two System.Data.DataTable objects that have the same DataTable.TableName property value but different DataTable.Namespace property values. For more information about working with System.Data.DataTable objects, see Creating a DataTable.
If you are creating a System.Data.DataTable programmatically, you must first define its schema by adding System.Data.DataColumn objects to the System.Data.DataColumnCollection (accessed through the DataTable.Columns property). For more information about adding System.Data.DataColumn objects, see Adding Columns to a Table.
To add rows to a System.Data.DataTable, you must first use the DataTable.NewRow method to return a new System.Data.DataRow object. The DataTable.NewRow method returns a row with the schema of the System.Data.DataTable, as it is defined by the table's System.Data.DataColumnCollection. The maximum number of rows that a System.Data.DataTable can store is 16,777,216. For more information, see Adding Data to a Table.
There are many System.Data.DataTable events that can be used to determine when changes are made to a table. These include DataTable.RowChanged, DataTable.RowChanging, DataTable.RowDeleting, and DataTable.RowDeleted. For more information about the events that can be used with a System.Data.DataTable, see Working with DataTable Events.
The System.Data.DataSet and System.Data.DataTable objects inherit from System.ComponentModel.MarshalByValueComponent, and support the System.Runtime.Serialization.ISerializable interface for .NET Framework remoting. These are the only ADO.NET objects that you can use for .NET Framework remoting.