开发者

Rearranging a class's methods, properties and variables

开发者 https://www.devze.com 2023-02-14 16:50 出处:网络
In Visual Studio 2008, is it possible to rearrange a C# file automatically based on methods, properties or variables?

In Visual Studio 2008, is it possible to rearrange a C# file automatically based on methods, properties or variables?

I could do this by manually, but was wondering if there is something tha开发者_运维技巧t will automatically do the arranging. Basically I would like some kind of a grouping mechanism.


Not natively. Have a look at ReSharper by JetBrains. It's not free, but more than pays for itself in a little over 5 minutes of usage (depending on how slow you type).

EDIT:
In response to comments, I must qualify that reordering and group code blocks in ReSharper requires the StyleCop for ReSharper plugin. It is a free, open source plugin for ReSharper and is available on Codeplex.


There is a free plugin called Regionerate. I personally don't like it but it does what you want.


You could also look at CodeRush Xpress for C# http://msdn.microsoft.com/en-us/vcsharp/ee663901.aspx it is free and has refactoring tools included.


Or by chance if you are using "DevExpress" in your projects, it comes with Refactoring utility which you can make use of.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号