How to order properties in alphabetical order (Visual Studio 2008)

I am really anal and would like to order class properties alphabetically / by type.

Is this possible using a pre-existing function in VS or a macro that can do this?

For example:

public string foo {get; set;}
public string bar {get; set;}
public int fong {get; set;}
public string loo {get; set;}

(if you want to order alphabetically)

public string bar {get; set;}
public int fong {get; set;}
public string foo {get; set;}
public string loo {get; set;}

or (if you want to order by type, then alphabeticall)

public string bar {get; set;}
public string foo {get; set;}
public string loo {get; set;}
public int fong {get; set;}

Many thanks!

+3
source share
2 answers

As far as I know, but both DevExpress' CodeRush / Refactor (via add-on) and Resharper through their code formatting functions support this.

Mark

+3
source

. Excel, Visual Studio.

  • / VS
  • Excel
  • / Excel
  • /
  • " "
  • / . / Excel
  • / VS

+2

Source: https://habr.com/ru/post/1703560/


All Articles