Gets the name for the specified value.

Namespace:  ESRI.ArcGISExplorer.Data

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

Syntax

C#
public string GetCodedName(
	Object value
)
Visual Basic (Declaration)
Public Function GetCodedName ( _
	value As Object _
) As String

Parameters

value
Type: System..::.Object

An integer representing a domain value which is used to lookup the corresponding name.

Return Value

The name which is paired with the value. If an invalid value is specified, an empty string will be returned.

Examples

The code below finds a domain in a file geodatabase and looks up the name associated with a specific value using the GetCodedName method.
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