Gets the collection of tables contained in the DataSet.
[Visual Basic] Public ReadOnly Property Tables As TablesCollection [C#] public TablesCollection Tables {get;} [C++] public: __property TablesCollection* get_Tables(); [JScript] public function get Tables() : TablesCollection;
The TablesCollection contained by this DataSet.
To add tables to the collection, use the TablesCollection class's Add method. To remove tables, use the Remove method.
The following example returns the DataSet object's TablesCollection, and prints the columns and rows in each table.
[Visual Basic]
Private Sub PrintRows() Dim t As DataTable Dim r As DataRow Dim c As DataColumn For Each t in DataSet1.Tables For Each r In t.Rows For c in t.Columns Console.WriteLine(r(c.ColumnName)) Next c Next r Next t End Sub
DataSet Class | DataSet Members | System.Data Namespace | DataTable | TablesCollection