简体   繁体   English

如何查看在 Visual Studios 2015 中使用解决方案资源管理器声明和定义 class 对象的位置?

[英]How do I see the where class OBJECTS are declared and defined using solution explorer in Visual Studios 2015?

I'm using Visual Studios 2015.我正在使用 Visual Studios 2015。

I'd like to see where a class object is declared and defined in my code.我想看看在我的代码中声明和定义 class object 的位置。
Eg Where are statements like myClass object1;例如,像myClass object1; ? ?

Also, is there a way to use the find all references tool on a class method and not see other classes' methods of the same name?另外,有没有办法在 class 方法上使用查找所有引用工具,而看不到其他类的同名方法?
Eg We have myclass1::Run() , myclass2::Run() and perhaps a variable Run somewhere.例如,我们有myclass1::Run()myclass2::Run() ,也许还有一个变量Run某处。 Can I specify which kind of reference I'm looking for?我可以指定我正在寻找哪种参考吗?

Simple questions, but I haven't been able to find the answers elsewhere.简单的问题,但我无法在其他地方找到答案。

In Visual Studio 2019, the Find All References command should do exactly what you want.在 Visual Studio 2019 中,“ Find All References命令应该完全符合您的要求。 It should automatically return only the references for the particular type or member that you selected, not other symbols that happen to have the same name.它应该只自动返回您选择的特定类型或成员的引用,而不是碰巧具有相同名称的其他符号。

To be clear, the way I use the Find All References command does not involve the Solution Explorer.需要明确的是,我使用Find All References命令的方式不涉及解决方案资源管理器。 Rather, I select the name in the code editor, right-click and choose Find All References (or press a keyboard shortcut, usually F4).而是,我在代码编辑器中命名 select,右键单击并选择Find All References (或按键盘快捷键,通常是 F4)。 That approach works in VS 2015, 2017, and 2019, etc. However, the results window changed drastically from VS 2015 to VS 2017 and newer.该方法适用于 VS 2015、2017 和 2019 等。但是,结果 window 从 VS 2015 到 VS 2017 及更新版本发生了巨大变化。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决调用 size() 时 Visual Studios 无法识别数组的 class 类型的问题? - How do I fix the issue where Visual Studios doesn't recognize the class type of the array when size() is called? 我无法在解决方案资源管理器Visual Studio Community 2015中运行多个文件 - I cannot run multiple files within solution explorer Visual Studio Community 2015 类对象应该在哪里声明? - Where should class objects be declared? 在Visual Studio 2015中定义的NDEBUG和_DEBUG在哪里? - Where are NDEBUG and _DEBUG Defined in Visual Studio 2015? 寻找 2013 年视觉工作室的图书馆,在哪里以及如何获得 - in search of libraries for visual studios 2013, where & how to obtain 使用Visual Studios 2012进行C ++编码时,如何自动完成在IntelliSense中选择的代码? - When using Visual Studios 2012 for coding in C++, how do you autocomplete code selected in IntelliSense? VS2015:如何隐藏解决方案资源管理器中的“参考”文件夹? - VS2015: How to hide the 'References' folder in solution explorer? 在Visual Studios 2012中,我需要创建什么类型的项目? - In Visual Studios 2012 What Type Of Project do I Need To Create? Visual Studio Code找不到我在C ++中声明和定义的类 - Visual Studio Code can't find the class that I've declared and defined in C++ 如何为 Windows 和 Android 创建 SDL2 Visual Studio 2015 或 2017 解决方案? - How do you create SDL2 Visual Studio 2015 or 2017 Solution For Windows and Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM