Visual Studio (2012) - 默认折叠方法? [英] Visual Studio (2012) - Collapse methods by default?
问题描述
我的项目有一个类有几个方法,很多方法都被重载了.要访问我的大班级中的任何特定方法,我必须滚动非常长的时间.这个类太大了,有时找到一个特定的方法可能很困难.我希望能够折叠(或折叠)一些方法,以便在我的班级内部工作更容易.我在考虑 #region
但是,我需要一个对于我的每种方法.
My project has a class with several methods, and many of the methods are overloaded. To access any specific method in my large class, I have to scroll for an unusually long time. The class is so big, sometimes finding a particular method can be difficult. I would like to be able to collapse (or fold) some of the methods, so that it is easier to work inside of my class.I was thinking about #region
but, I will need to have one for each of my methods.
如何折叠(折叠)我的方法?
How can I collapse (fold) my methods?
推荐答案
我认为没有可以做到这一点的默认设置,尽管我可能会误会.在 VS2008 中有一个快捷方式可以使用,不确定它是否适用于 2012,但您可以尝试一下.
I think that there isn't a default setting that can do that, although I might be mistaken. There is a shortcut you can use in VS2008, not sure if it will work on 2012, but you might give it a shot.
Ctrl + M + O
- 全部折叠
Ctrl + M + L
- 展开全部
Ctrl + M + P
- 展开全部并禁用大纲
Ctrl + M + P
- expand all and disable outlining
Ctrl + M + M
- 折叠/展开当前部分
Ctrl + M + M
- collapse/expand the current section
这篇关于Visual Studio (2012) - 默认折叠方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!