Returns a collection of Domain objects which represents all the domains defined in a geodatabase.

Namespace:  ESRI.ArcGISExplorer.Data
Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)

Syntax

C#
public DomainCollection GetDomains()
Visual Basic (Declaration)
Public Function GetDomains As DomainCollection

Return Value

A DomainCollection object which is a collection of all the Domain objects defined in the geodatabase.

Examples

The code below iterates over all the domains defined in a geodatabase and prints out the name and domain type for each one.
CopyC#
//Open the geodatabase
Geodatabase fileGdb = new Geodatabase(@"C:\Data\Scotland.gdb");

//Return each domain defined in the geodatabase
foreach (Domain domain in fileGdb.GetDomains())
{
  System.Diagnostics.Debug.Print(domain.Name);             //Print the name of the Domain
  System.Diagnostics.Debug.Print(domain.Type.ToString());  //Print the type of Domain
}
CopyVB.NET
'Open the geodatabase
Dim fileGdb As Geodatabase = New Geodatabase("C:\Data\Scotland.gdb")

'Return each domain defined in the geodatabase
For Each gdbDomain As Domain In fileGdb.GetDomains()
  System.Diagnostics.Debug.Print(gdbDomain.Name) 'Print the name of the Domain
  System.Diagnostics.Debug.Print(gdbDomain.Type) 'Print the type of Domain
Next

See Also

Relate Topics:
  GetGeodatabaseFolders Method
  GetRasters Method
  GetTableRelationships Method
  GetTables Method
  OpenGeodatabaseFolder Method
  OpenRaster Method
  OpenTable Method
  OpenTableRelationship Method
Created by Atop CHM to web converter,© 2009 all right reserved.