Navigate to a virtual member from the member that overrides it

Posted by axrwkr on Super User See other posts from Super User or by axrwkr
Published on 2013-06-24T16:16:00Z Indexed on 2013/06/24 16:25 UTC
Read the original article Hit count: 246

Using visual studio, in the editor window, I am able to navigate from the usage of a member to the line and file where it is declared by pressing F12 while the cursor is over that member by or right clicking on the member and selecting "Go To Definition".

I would like to find a way to navigate from an override member to the base class member that it overrides.

For example, if I have the following class with one method

public class SomeClass {
    public virtual void TheMethod() {
        // do something
    }
}

An I override that method somewhere else in the project or solution similar to the following

public OtherClass : SomeClass {
    public override void TheMethod()    {
        // do something else
    }
}

I want to navigate from the declaration of TheMethod in OtherClass to the declaration of TheMethod in SomeClass

Is there a way to do this?

I've found that I can find the definition of the member in the base class by pressing Shift + F12 (Find all References) and then looking through the list occurances, this works fine most of the time, since the list isn't usually that long but it would be much better to have a way to go there directly.

© Super User or respective owner

Related posts about keyboard-shortcuts

Related posts about visual-studio-2010