I hav tried something like
Type objectAType = objectA.GetType();
if(objectB is objectAType)
....
That does not work, because the "is" statement requires a
class name and not a object of type "Type".
Any suggestions?
HelgeS
I think you can use the method Type.IsInstanceOfType(). If you look at the
.NET SDK documentation on that method, you can find an example that shows a
good example of its use.
Have a nice day
GV
"HelgeS" <anon...@discussions.microsoft.com> wrote in message
news:022f01c3d628$111f84a0$a501...@phx.gbl...
Have a nice day
HelgeS
>-----Original Message-----
>Hi.
>
>I think you can use the method Type.IsInstanceOfType().
If you look at the
>..NET SDK documentation on that method, you can find an
example that shows a
>good example of its use.
>
>Have a nice day
>GV
>
>
>
>
>"HelgeS" <anon...@discussions.microsoft.com> wrote in
message
>news:022f01c3d628$111f84a0$a501...@phx.gbl...
>> I want to determin if objectA is of the same type as
>> objectB, or is inherrited from the same type.
>>
>> I hav tried something like
>> Type objectAType = objectA.GetType();
>> if(objectB is objectAType)
>> ....
>>
>> That does not work, because the "is" statement
requires a
>> class name and not a object of type "Type".
>>
>> Any suggestions?
>>
>> HelgeS
>
>
>.
>