Loading ...

Resharper: Sort properties alphabetically in a file | CodeAsp.Net

ReSharper: Sort properties alphabetically in a file

 /5
0 (0votes)

If you are using ReSharper and want to sort your properties in an existing file, this blog will help you. I am writing the steps which will help you to sort the properties alphabetically: 

  1. Go to Resharper >> Options

  2. Go to C# >> Typer Members Layout. Select "Custom layout" radio button

  3. Scroll to "properties, indexers" section.

  4. Add the follwing section after "Match" Tag":
       <Sort>
            <Name/>
       </Sort>




  5. Click the "Save" button.
  6. Now go to your file where you want to Sort the properties. Run "Clean up code" ( CTRL+ ALT+ F) and then do "Full clean up". You will see the properties sorted by name after "clean up".

 

Comments (no comments yet)

Top Posts