The .NET API through
the System.Reflection namespace allows you to query the metadata in a .NET
module at runtime. It will also allow you to query type information for an
object. The System.Type class is fundamental to Runtime Type Identification.
You use the GetType method of the object to get the type. In this C# example
GetType and the Name property is used to find out if the entity is a
Polyline2d. In VB there is also a GetType function and the equivalent in C#
is the typeof operator. You will use these functions to ensure your code is
working on the right type of entity. |
|