How to reorder type members with Resharper?

前端 未结 8 468
名媛妹妹
名媛妹妹 2021-02-01 12:48

Typical scenario: a class that a lot of people have worked on. I\'d like to sort methods, properties, etc... in alphabetical order.

I\'d like to be able to do this wit

8条回答
  •  执笔经年
    2021-02-01 13:13

    jgauffin's answer is close, but I found that (with R# 2017) to reorder Properties I needed to click the 'XAML' option in the header of the File Layout dialog and change

    
      
        
          
          
        
      
    
    

    to

    
      
        
          
          
        
      
      
        
      
    
    

    The 'Sort By' property was empty and read-only, which makes sense because it's only used for items with the same name (and all properties should be uniquely named)

提交回复
热议问题