Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# organizing my code

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 )

like image 638
illegal-immigrant Avatar asked Jan 21 '11 15:01

illegal-immigrant


2 Answers

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/

like image 87
Chris Conway Avatar answered Oct 14 '22 14:10

Chris Conway


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

like image 36
Femaref Avatar answered Oct 14 '22 16:10

Femaref