Visual Studio window which shows list of methods

2019-01-16 17:26发布

In Visual Studio, is there a window which shows list of methods in the active class? A small window like the Solution Explorer would be great. In Eclipse, there is one.

19条回答
等我变得足够好
2楼-- · 2019-01-16 18:08

In VS 2012, just go to View > Class View...then you get the Class View GUI in the main tab area. Now, drag this over to the side dock and you have the exact same layout as you would in Eclipse.

-e

查看更多
ゆ 、 Hurt°
3楼-- · 2019-01-16 18:09

Since Visual Studio 2012, you can view the outline ( fields and methods) in the solution explorer by expanding the node corresponding to your file .

查看更多
该账号已被封号
4楼-- · 2019-01-16 18:10

ReSharper has a 'ReSharper | Windows | File Structure' window, which is used for visualizing current code file structure.

查看更多
ら.Afraid
5楼-- · 2019-01-16 18:14

I found how to turn the drop down on as shown in the first answer (@ChrisF):

Go to Options->Text Editor->(your language)

and tick "Navigation bar" in the display section.

查看更多
Anthone
6楼-- · 2019-01-16 18:14

In Visual Studio 2015, View > Other Windows > Resource View. The keyboard shortcut is Ctrl+Shift+E. I find this cleaner than Class View. With Class View Windows you can filter methods/attributes based on access modifier (private/protected/public) etc.

查看更多
做个烂人
7楼-- · 2019-01-16 18:15

At the top of your text editor, you should have a dropdown that lists all the methods, properties etc in the current type; and it's clickable (even if those members are defined in other files - in which case they're greyed out but you can still navigate with them).

Also, if you use the Class Explorer (Ctrl+Alt+C) to navigate your project, then you'll get a full overview of all your types. However, there doesn't appear to be a setting in Tools/Options that allows you to track the active type in that window (there is for the solution explorer) - perhaps a macro or addin is in order...

查看更多
登录 后发表回答