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: (


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.


The code below iterates over all the domains defined in a geodatabase and prints out the name and domain type for each one.
//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
'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

See Also