Gets the value of the subtype for the specified name.

Namespace:  ESRI.ArcGISExplorer.Data

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

Syntax

C#
public int GetSubtypeValue(
	string name
)
Visual Basic (Declaration)
Public Function GetSubtypeValue ( _
	name As String _
) As Integer

Parameters

name
Type: System..::.String

The name which is used to lookup the subtype value.

Return Value

The value of the subtype. If an invalid name is specified, -1 will be returned.

Examples

The code below demonstrates how to use the GetSubtypeValue method to build an SQL expression which is used to search a Table.
CopyC#
//Open the Buildings feature class which has been subtyped.
Table buildings = Table.OpenFileGeodatabaseTable(@"C:\Data\CalgaryData2.gdb", "Buildings");

//Create an SQL expression which will be used to search the Table
//The BLDG_CODE is the subtyped column so use the GetSubtypeValue method to lookup the value stored
//in the Table for this subtype descriptive name
string whereClause = string.Format("BLDG_CODE={0}",buildings.Columns.Subtypes.GetSubtypeValue("Garage"));

//Perform a search on the Table
RowCollection searchedRows = buildings.Search(new Filter(whereClause));
CopyVB.NET
'Open the Buildings feature class which has been subtyped.
Dim buildings As Table = Table.OpenFileGeodatabaseTable("C:\Data\CalgaryData2.gdb", "Buildings")

      'Create an SQL expression which will be used to search the Table
'The BLDG_CODE is the subtyped column so use the GetSubtypeValue method to lookup the value stored
'in the Table for this subtype descriptive name
Dim whereClause As String = String.Format("BLDG_CODE={0}", buildings.Columns.Subtypes.GetSubtypeValue("Garage"))

'Perform a search on the Table
Dim searchedRows As RowCollection = buildings.Search(New Filter(whereClause))

See Also