6

does any tool (VS extension, or maybe Resharper supports this...) exist which can orginize code in my class in some specified way? Like this :

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

etc

(and all are sorted alphabetically)

It would be so nice...

I like to have my code very organized, but sometimes I do not follow my own rules and than reorganizing everything by hands may be a little bit problematic )

illegal-immigrant
  • 8,089
  • 9
  • 51
  • 84
  • Also see [make-resharper-respect-your-preference-for-code-order?](http://stackoverflow.com/questions/603805/make-resharper-respect-your-preference-for-code-order?lq=1) – nawfal Jun 04 '13 at 06:28

3 Answers3

6

Yes, ReSharper can do it. You can even customize the way it organizes items... take a look at this blog post by Hadi Hariri http://hadihariri.com/2011/01/04/in-depth-look-at-customizing-type-layout-with-resharper/

Chris Conway
  • 16,269
  • 23
  • 96
  • 113
3

Yes, resharper has such a feature (and many other equally marvelous ones).

Femaref
  • 60,705
  • 7
  • 138
  • 176
3

Telerik's JustCode has this feature as well. Code ordering rules are easily customizable through the Options dialog - No XML. JustCode - Reordering

Deyan Varchev
  • 166
  • 1
  • 4