F
Fredrik Strandberg
Hi!
I receive an object as a System.Object argument to a method. I need to
check if the object is a Type object or not (that is, not a specific
type, but if the object is a type object in general). How can I do
this? Is there a way of checking if my object inherits from the
System.Type class?
sub myMethod(obj as Object)
if ("obj is a type object")
...do my stuff...
I could not find any solution in any thread in the google groups. I
only find threads about how to determine the Type of an object, but I
need to determine if my object is a Type object!
As far as i understand, I am not able to use the Type.IsInstanceOfType
method since the Type class is abstract, i.e.
Type typeObj
typeObj.IsInstanceOfType(GetType(obj))
does not work.
Thank you for your time!
/Fredrik
I receive an object as a System.Object argument to a method. I need to
check if the object is a Type object or not (that is, not a specific
type, but if the object is a type object in general). How can I do
this? Is there a way of checking if my object inherits from the
System.Type class?
sub myMethod(obj as Object)
if ("obj is a type object")
...do my stuff...
I could not find any solution in any thread in the google groups. I
only find threads about how to determine the Type of an object, but I
need to determine if my object is a Type object!
As far as i understand, I am not able to use the Type.IsInstanceOfType
method since the Type class is abstract, i.e.
Type typeObj
typeObj.IsInstanceOfType(GetType(obj))
does not work.
Thank you for your time!
/Fredrik