开发者

Finding Sub-Classes and Implementations

开发者 https://www.devze.com 2023-03-09 06:22 出处:网络
My favorite way to find subclasses of class \'X\' or implementations of interface \'Y\' has been to use Red Gate\'s Reflector.But I\'d like to know if there is a (free) way to do the same thing from V

My favorite way to find subclasses of class 'X' or implementations of interface 'Y' has been to use Red Gate's Reflector. But I'd like to know if there is a (free) way to do the same thing from VS 2010. Does 2010 already have this ability? Is there a plugin I can add?

The object browser, the place I might expect this feature to be found, does not seem to have this capability. It ca开发者_如何学Cn tell you about a parent type, but it does not tell you about derived types.


A more non-straight forward but works in all cases is to temporarily change the class/interface that you are modifying to abstract and add a abstract method.property and rebuild the solution :) all the build errors would point you towards the direct/indirect children.


While I've not found a RedGate Reflector level of functionality for this need, I have started using a partial solution. Using the regex search capability in VS, I enter the following:

\:.@<place base class or interface here>

Example:

\:.@MyBase

Any derivative interface or class made from "MyBase," defined in the solution, will be returned.


I've just found free Inheritance Margin Extension. With this I can view inheritance info right in the code editor and also navigate to base/overridden items (with right mouse click on the inheritance glyph).

0

精彩评论

暂无评论...
验证码 换一张
取 消