Visual Studio "Go to implementation "
On a right mouse click on a method call, we get a context menu with options "Go to definition" and "Go to implementation" options among others.
Why is the &开发者_C百科quot;Go to implementation" option sometimes missing?
For visual studio 2015, there is this extension: Go To Implementation
It's an extension that allows to go to the implementation of the selected class, method or property (useful when using interfaces). Similar to the ReSharper feature.
It also supports multiple implementations when found
Of course already exists in Visual Studio ! It is there since ever.
Right click on your code (Ex: property) an select "View Call Hierarchy". In Call Hierarchy window select the Implements folder.
There you are. Why Resharper ??? Of course is not that complex as go to implementation from resharper which allows direct interrogation on interface, but only a property, or a method from that interface should be enough. Ex:
public interface IModule
{
int Count { get; set; }
}
public class Module : Imodule
{
public int Count {get; set;}
}
public class Module2 : Imodule
{
public int Count {get; set;}
}
Right click on the property (anywhere - inside the class or inside the interface) and select "View Call Hierarchy", should say which class implements them, and therefore the whole Interface.
At the beginning we all love Resharper, with time, we all hate it !
This ReSharper context menu item "Go To Implementation" only shows up if there is an implementation for the base member.
It is not shows up in every place because ReSharper does not find itself on the base member that has been implemented.
http://www.jetbrains.com/resharper/features/navigation_search.html#Go_to_Implementation
I think that happens sometimes when you load a file individually that isn't part of a project. When you make a VC++ project, Visual studio generates an intellisense database. *.ncb in older versions, and *.sdf in 2010
精彩评论