0

In Visual Studio when I have a base class with method
public virtual void A()
and a derived class with method
public override void A()
how can I navigate from the latter to the definition in the base class?

When I view the Call Hierarchy I see:
A
- Calls To 'A'
- Calls To Base Member 'A'
Not the definition Base A.

Gerard
  • 13,023
  • 14
  • 72
  • 125

1 Answers1

2

In the method public override void A() set the cursor at the word override and press F12 i.e. 'Go To Definition'.

It also works correctly when there are more levels of inheritance.

Gerard
  • 13,023
  • 14
  • 72
  • 125
  • 2
    Not sure if this still works... In VS 2022 doing exactly that brings me to "xkeycheck.h", to the definition of the 'override' keyword. – Soraphis May 16 '23 at 08:30