Gets a value indicating whether the Table is subtyped. The property only applies to tables and feature classes stored in geodatabases.

Namespace:  ESRI.ArcGISExplorer.Data

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

Syntax

C#
public bool IsSubtyped { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsSubtyped As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) if the Table is subtyped; otherwise, falseFalsefalsefalse (False in Visual Basic).

Examples

The code below demonstrates how to access the subtypes in a Table. The Table.IsSubtyped property is used to check that the Table is subtyped before using the ColumncCollection.Subtypes property to return a Subtypes object.
CopyC#
//Open the Buildings feature class
Table buildings = Table.OpenFileGeodatabaseTable(@"C:\Data\CalgaryData2.gdb", "Buildings");

//Check that the Table is subtyped
if (buildings.IsSubtyped)
{
  //Return the Subtypes from the ColumnCollection
  Subtypes subs = buildings.Columns.Subtypes;

  //Print the name of the Column which manages the subtypes
  System.Diagnostics.Debug.Print(subs.SubtypeColumnName);   //Prints "BLDG_CODE"

  //Return a sorted list (value/description name) containing all the subtypes  
  SortedList<int, string> subtypesList = subs.GetSubtypeValueNamePairs();

  //Print out the contents of the subtypes
  for (int i = 0; i < subs.Count-1; i++)
  {
    //Each Key is the subtype value
    System.Diagnostics.Debug.Print(subtypesList.Keys[i].ToString());
    //Each Value is the subtype descriptive name
    System.Diagnostics.Debug.Print(subtypesList.Values[i].ToString());
  }      
}
CopyVB.NET
'Open the Buildings feature class
Dim buildings As Table = Table.OpenFileGeodatabaseTable("C:\Data\CalgaryData2.gdb", "Buildings")

'Check that the Table is subtyped
If (buildings.IsSubtyped) Then

  'Return the Subtypes from the ColumnCollection
  Dim subs As Subtypes = buildings.Columns.Subtypes

  'Print the name of the Column which manages the subtypes
  System.Diagnostics.Debug.Print(subs.SubtypeColumnName)   'Prints "BLDG_CODE"


  'Return a sorted list (value/description name) containing all the subtypes  
  Dim subtypesList As SortedList(Of Integer, String) = subs.GetSubtypeValueNamePairs()

  'Print out the contents of the subtypes
  For i As Integer = 0 To subs.Count - 1
    'Each Key is the subtype value
    System.Diagnostics.Debug.Print(subtypesList.Keys.Item(i).ToString())
    'Each Value is the subtype descriptive name
    System.Diagnostics.Debug.Print(subtypesList.Values.Item(i).ToString())
  Next

End If

See Also