Jonathan Allen
Jonathan Allen

Reputation: 70327

Code Sorting Tool for .NET

Are there any tools for sorting and organizing tools for C#/VB. Specifically one that does stuff like moving all the fields to the top of the file, alphabetizing the methods, etc.

Upvotes: 1

Views: 105

Answers (1)

adrianbanks
adrianbanks

Reputation: 83004

ReSharper has the ability to do this. If you go to ReSharper -> Options -> Code Cleanup you can enable the Reorder type members option. This enabled the code reordering when you do a code cleanup (ReSharper -> Tools -> Cleanup Code...).

There is also an option to set a custom template to specify how to rearrange the code. This can be set in ReSharper -> Options -> C# -> Type Members Layout.

Upvotes: 2

Related Questions