Using .net object on navision 2.60 GetType Object ?

Hi, i’m new in navision, i have a .net class expose to navision, this class expose 2 types of class (automation variables)

Object1 and Object 2 , i call a function from my dll class this can respose a object of type object1 or object 2.

Exist one way how i can determinate what kind of object i’m getting from my function ?

I have developed a poor but functional solution.

I create a class that exposes objects inside others example:

myclassfornavision class
{
public myobject1 p1;
public myobject2 p2;
/ / At this property which expose him to fill from Navision to
/ / Create an automation variable from the value that I placed in this
// property and here navision takes the value that suits at objecto2 or objecto1
public string myobjecttype;

}

I posted code and how i set solution http://danywalls.com/post/19403188512/exponer-objectos-de-net-via-com-para-navision-2-60