C#组织我的代码

ill*_*ant 6 c# resharper code-formatting code-organization visual-studio-2010

是否存在任何工具(VS扩展,或者可能是Resharper支持此...),它可以以某种指定的方式对我的类中的代码进行组织?像这样 :

public static fields/properties
private static fields/properties

public fields/properties
private fields/properties

constructors

public static methods
private static methods

public methods
private methods
Run Code Online (Sandbox Code Playgroud)

等等

(并且所有都按字母顺序排序)

真是太好了......

我喜欢让我的代码非常有条理,但有时我不遵循我自己的规则而不是手工重组一切可能会有点问题)

Chr*_*way 6

是的,ReSharper可以做到.你甚至可以自定义组织项目的方式......看看Hadi Hariri的博客文章http://hadihariri.com/2011/01/04/in-depth-look-at-customizing-type-layout-与-ReSharper的/