Alphabetizing methods in Visual Studio

80bower picture 80bower · Jan 21, 2009 · Viewed 29.4k times · Source

Is there any sort of plug-in or tool available for Visual Studio 2008 to alphabetize methods? Ideally I'd like a tool that will alphabetize a selection, or specified type (i.e. only methods, not member variables), either automatically or on-demand.

Answer

Gabriel Andrés Brancolini picture Gabriel Andrés Brancolini · Nov 14, 2015

While Resharper has many cool features it has a large impact in CPU and I/O usage and can be very complicated to use. It is also only available under commercial licensing unless you qualify for a few very specific free use licenses.

Try CodeMaid. It is free for commercial use and has a much lower performance overhead. I find it easy to use and it is very good for alphabetizing methods.


To sort your file, open the file via solution explorer:

  1. Right click the open file
  2. Code Maid menu (likely near the top of the right click menu)
  3. Click Reorganize Active Document

Alternatively, using the default CodeMaid hotkeys CTRL+M,Z to sort your active file.