Ctrl M-L不会在vb.net(2008)中切换所有区域,当区域之间存在层次结构时。我不喜欢区域。有没有一种方法可以展开所有区域或永久删除它们?
移除 Visual Studio 中的区域
原标题:
最佳回答
没有一种方法可以在嵌套大纲中扩展全部大纲,使用 Cntrl-M,L 可以扩展全部大纲(或使用 Cntrl-M,Cntrl-M 扩展一个区域)。VB.NET 没有像 C# 一样切换大纲模式的选项。
问题回答
在VB.Net中,执行搜索和替换操作时,选择“使用隐藏”和“使用正则表达式”。
替换:
^.*#(end)*(:Wh)*region.*
跟:
詹姆斯·尼斯声称,“NArrange也可以用作从源代码中剥离区域的工具。”
I hadn t thought about it until now, but NArrange could also be used as a tool to strip regions from source code.
If you were to define an empty elements declaration for types, see below, then NArrange will just parse the members and write them back. It won t sort anything, but rather will just strip regions and clean up whitespace between members.
<Element Type="Type" Id="DefaultType">
<Elements>
<Element>
<Elements />
</Element>
</Elements>
</Element>
However, this won t remove regions that are defined within members.
来源:http://www.codeproject.com/KB/codegen/narrange.aspx?msg=2579903#xx2579903xx
相关问题
热门标签
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding