NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataSet.Tables

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;

Property Value

The TablesCollection contained by this DataSet.

Remarks

To add tables to the collection, use the TablesCollection class's Add method. To remove tables, use the Remove method.

Example [Visual Basic]

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

See Also

DataSet Class | DataSet Members | System.Data Namespace | DataTable | TablesCollection