Returns a collection of Table objects which represents all the tables and feature classes in a geodatabase.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public ReadOnlyCollection<Table> GetTables() |
Visual Basic (Declaration) |
---|
Public Function GetTables As ReadOnlyCollection(Of Table) |
Return Value
A ReadOnlyCollection object consisting of Table objects each of which represents either a geodatabase table (non-spatial) or a feature class (spatial, vector format).Examples
The code below shows how to iterate over all the tables and feature classes in a geodatabase.
CopyC#
//Open the geodatabase Geodatabase fileGdb = new Geodatabase(@"C:\Data\Scotland.gdb"); //Loop over a collection of all tables and feature classes foreach (Table table in fileGdb.GetTables()) { //Print the name of each table or feature class in the geodatabase System.Diagnostics.Debug.Print(table.Name); }
CopyVB.NET
'Open the geodatabase Dim fileGdb As Geodatabase = New Geodatabase("C:\Data\Scotland.gdb") 'Loop over an enumeration of all tables and feature classes For Each gdbTable As Table In fileGdb.GetTables() 'Print the name of each table or feature class in the geodatabase System.Diagnostics.Debug.Print(gdbTable.Name) Next