次の方法で共有


Understanding the Navigation Stack (C#)

Keyboard:  CTRL + SHIFT + 8 (backward); CTRL + SHIFT + 7 (forward)
Command:  View.PopBrowseContext; View.ForwardBrowseContext
Versions:  2008,2010
Published:  10/18/2010
Code:  vstipEdit0078

 

Did you know there is a dedicated stack available just for going to definitions?  Here are a couple of examples:

 

If you are looking at, say, a method call:

image

 

And press F12 to go to its definition:

image

 

How do you go back?  Easy!  Just press CTRL + SHIFT + 8 and it will take you back, no problem:

image

 

Pressing CTRL + SHIFT + 7 will move you to the definition again:

image

 

 

 

So what's going on?  Well every time you go to a definition it keeps track of where you come from.  This will work every time you go to definition so you can always find your way back.  Here is another example:

image

 

F12 (go to definition):

image

 

From here you could press CTRL + SHIFT + 8 to go back.  But what if you want to keep digging into definitions?  No problem!  Click in the GetNumber method:

image

 

And press F12:

image

 

Now, if you want to go back, press CTRL + SHIFT + 8:

image

 

Then CTRL + SHIFT + 8 again:

image

Comments

  • Anonymous
    October 28, 2010
    CTRL+SHIFT+8 isn't working for me in VB web site

  • Anonymous
    October 28, 2010
    I later learned I was looking for View.NavigateBackwards  CRTL+- which works in the text editor