The very first thing which comes to our mind is is operator like
bool IsDerived = a class is Interface
Well, that is not correct. why ? because
is operator is used to check whether the run-time type of an object
is compatible with a given type.
An expression where the use of is conforms to the syntax, evaluates to true, if both of the following conditions are met:
(type)(expression) will complete without throwing an exception. For
more information, see 7.6.6 Cast
expressions.
Solution is to use:
bool IsDerived = typeof(ISomeInterface).IsAssignableFrom(typeof(T));
References