I can right click a variable/method/class etc and click 'go to definition' and it will show me where that variable/method/class was created.
Is there a way to do the opposite of that? Is there a way to see where that variable/method/class is used in your C# project?
Ctrl-click Go To Definition Ctrl+click is a shortcut for mouse users to quickly access Go To Definition. Symbols become clickable when you press Ctrl and hover over the type or member. To quickly navigate to the definition of a symbol, press the Ctrl key and then click on it. It's that easy!
In Visual Studio Code, you can also use Alt + Left-Arrow to return to your original location in the source code after navigating with F12.
By default, Alt+Left navigates back, and if you remove the Alt+Right shortcut for Edit. CompleteWord in Microsoft Visual Studio, Alt+Right navigates forward.
Right click, find all References. Or use Ctrl+K+R
UPDATE
I know where the Ctrl+K+R vs Shift+F12 confusion stems from. For developers that set up their environment settings for C#, Visual Basic or JavaScript, Ctrl+K+R is the keyboard shortcut that shows up in context menus. Shift+F12 is the keyboard shortcut that shows up in context menus when the environment settings is set up for Web Development or General.
To change the environment settings:
Tools > Import and Export Settings > No, just reset settings, overwriting my current settings > General / JavaScript / Visual Basic / Visual C# / Visual C++ / Visual F# / Web Development /Web Development (Code Only)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With