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:
The result of ‘By Length’ sorting: