ArcObjects Library Reference

Statements - Interrogate Object Snippet

Generic template for determining what type of object you are working with.

[C#]

//<-- Snippet Start -->
// DESCRIPTION:
// Generic template for determining what type of object you are working with.

if (objectexpression is typename) 
{ 
}

//<-- Snippet End -->
[Visual Basic .NET]

'<-- Snippet Start -->
' DESCRIPTION:
' Generic template for determining what type of object you are working with.

If TypeOf objectexpression Is typename Then

End If

'<-- Snippet End -->


Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • System