简体   繁体   中英

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.

I'd like to see where a class object is declared and defined in my code.
Eg Where are statements like 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?
Eg We have myclass1::Run() , myclass2::Run() and perhaps a variable Run somewhere. 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. 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. Rather, I select the name in the code editor, right-click and choose Find All References (or press a keyboard shortcut, usually 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM