4

I am trying to sort the methods by name that are in a class in a #region, is there a way?

#Region ABCD
   public void XYZ(){}
   public void ABC(){}
#EndRegion

Becomes:

#Region ABCD
   public void ABC(){}
   public void XYZ(){}
#EndRegion

Only those in the region (or if I have to, highlighted text) get sorted.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Ian Vink
  • 66,960
  • 104
  • 341
  • 555

2 Answers2

4

I'm not 100% sure but there is an option on ReSharper-->Tools-->Cleanup Code-->Reorder type members

enter image description here

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
1

try using CTRL-ALT-F i think, Code Cleanup. It will provide you with 2 default profiles that among other things will sort methods for you. You can define a profile that will suit your needs.

dutzu
  • 3,883
  • 13
  • 19