Home > Refactorings > Refactorings – Sort Namespace References

Refactorings – Sort Namespace References

April 18th, 2011

The Sort Namespace References refactoring is a stand-alone part of the Optimize Namespace References refactoring. In contrast to that refactoring, the Sort Namespace References refactoring doesn’t remove any references, and as the name says, it just sorts the ‘using’s (C#) or ‘Imports’ (VB) statements in the active source file.

The following sorting methods are available:

  • Alphabetically
  • By Length

These sorting methods are available only if the namespace references are not yet been sorted by any type of sorting:

Sort Namespace References refactoring preview

The result of ‘By Length’ sorting:

Sort Namespace References refactoring result

—–
Products: Refactor! Pro
Versions: 10.2 and up
VS IDEs: any
Updated: Apr/18/2011
ID: R024

Similar Posts: