Finds a geodatabase domain by name.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public Domain FindDomainByName(
	string domainName
)
Visual Basic (Declaration)
Public Function FindDomainByName ( _
	domainName As String _
) As Domain

Parameters

domainName
Type: System..::.String

The name of the domain.

Return Value

A Domain object.

Examples

The code below uses the FindDomainByName method to return a Domain in a file geodatabase.
CopyC#
{
  Geodatabase gdb = new Geodatabase(@"C:\Data\Montgomery.gdb");

  //Find the "ZoningCodes" domain in the "Montgomery" file geodatabase
  CodedValueDomain domain = gdb.GetDomains().FindDomainByName("ZoningCodes") as CodedValueDomain;

  //Look up the coded name for a "FH" value
  System.Diagnostics.Debug.Print(domain.GetCodedName("FH"));                  //Prints "Flood Hazard Area"

  //Look up the value for the "Residential" name
  System.Diagnostics.Debug.Print(domain.GetValue("Residential").ToString());  //Prints "R"
}
CopyVB.NET
Dim gdb As Geodatabase = New Geodatabase("C:\Data\Montgomery.gdb")

'Find the "ZoningCodes" domain in the "Montgomery" file geodatabase
Dim dom As CodedValueDomain = DirectCast(gdb.GetDomains().FindDomainByName("ZoningCodes"), CodedValueDomain)

'Look up the coded name for a "FH" value
System.Diagnostics.Debug.Print(dom.GetCodedName("FH"))                  'Prints "Flood Hazard Area"


'Look up the value for the "Residential" name
System.Diagnostics.Debug.Print(dom.GetValue("Residential").ToString())  'Prints "R"

See Also