Oftentimes when browsing code, I'll come across something like this:
public class Fruity
{
private IOrange _Orange;
public Fruity()
{
_Orange = new Orange() as IOrange;
}
public void PrepareFruit()
{
return _Orange.Peel();
}
}
Great, so now I want to see how the Peel method is implemented. Right-clicking on the method gives me Go To Definition which takes me to the interface stub.
OK, strictly speaking, the definition is ascribed by the interface given that the private variable is defined in this way, but is there any way to just go to the implementation?
There is of course Find All References which is a scatter-gun approach of calls, interfaces and concretions. But the source of the implementation is obvious in this case so I should be able to jump to it I'd have thought...
Evidently, there can sometimes be ambiguity which is described nicely here:
Go to definition on concrete type
But surely, there should be a Go To Implementation option when the implementation is crystal clear.
Fruity
, so how can we know you don't have a member function that sets_Orange
tonew MangoPretendingToBeAnOrange()
? – StriationResharper
. It's awesomely useful. – Oneida