1
Answer

typeof operator

George George

George George

16y
4.5k
1

Hello everyone,

typeof operator gets the exact type of a variable. My purpose is to check whether the

type of a variable derives from a specific base class, any ideas of how to use typeof to

solve this issue? Or using some other solution other than using typeof?

thanks in advance,
George

Answers (1)
0
Mamta M

Mamta M

NA 15k 2.1m 16y

The following link may help you for this, it even includes an example that is more or less similar to what you aim to do:

http://msdn.microsoft.com/en-us/library/system.object.gettype.aspx

Hope that helps.

-Mamta