If I want to know if a class inherits IDisposable
I have to Go To Definition
in each of its parent classes and interfaces?
Isn'开发者_运维技巧t there an easier way?
Put an instance of the class in question in a using statement. The compiler will tell you if it is possible with that class or not.
If you have resharper installed, you can use type hierarchy (Crl + E, H) to view it quickly.
bool implementsIDisposable = (classInstance is IDisposable);
精彩评论