Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut key to go to the method declaration? [duplicate]

I am working on an application which is not developed by me so while understanding the code,I generally go to the method definition by using F12, then there are chances that in this method another method may be there, then i go to this method definition by using F12 so now my question is that how can I back to the starting method

method 1-Here i pressed F12

method 2-After Pressing F12 i am here, method 3 was also called here then i pressed F12 again

method 3-At last I am here

So how can i go back to the method 1 or method 2.

language: C#

Thanks in advance

like image 511
Pankaj Kumar Avatar asked Dec 20 '22 13:12

Pankaj Kumar


2 Answers

Hard way: bookmark where you are, using Ctrl+B+T and back to your bookmark using Ctrl+B+N.

Easy way: Just press Ctrl+- to backward and press Ctrl+Shift+- to forward.

like image 166
Mohammad Mirmostafa Avatar answered Jan 12 '23 21:01

Mohammad Mirmostafa


Ctrl+- will navigate back to the previous code point.

like image 30
Sajeetharan Avatar answered Jan 12 '23 20:01

Sajeetharan