[英]Is there an opposite to 'go to definition' in Visual Studio?
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?
有没有办法看到在C#项目中使用变量/方法/类的位置?
Right click, find all References. 右键单击,找到所有引用。 Or use Ctrl + K + R
或者使用Ctrl + K + R.
UPDATE UPDATE
I know where the Ctrl+K+R vs Shift+F12 confusion stems from. 我知道Ctrl + K + R与Shift + F12的混淆源于何处。 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.
对于为C#,Visual Basic或JavaScript设置其环境设置的开发人员,Ctrl + K + R是在上下文菜单中显示的键盘快捷键。 Shift+F12 is the keyboard shortcut that shows up in context menus when the environment settings is set up for Web Development or General.
Shift + F12是键盘快捷键,当为Web Development或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) 工具>导入和导出设置>否,只需重置设置,覆盖我当前的设置>常规/ JavaScript / Visual Basic / Visual C#/ Visual C ++ / Visual F#/ Web开发/ Web开发(仅限代码)
Try Shift + F12 尝试Shift + F12
It will find all references. 它会找到所有参考文献。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.