i want all of the system usings at the top (sorted alphabetically) and then all other using statements afterwards (sorted alphabetically)
views:
78answers:
3
+1
A:
Don't know about RefactorPro, but since the question is tagged with "visual-studio-2008", you can do it in VS'08 by going to Tools -> Options -> Text Editor -> C# (or whatever is relevant) -> Advanced and then ticking "Place 'System' directives first when sorting usings".
Max Shawabkeh
2010-01-30 00:28:30
+1 - VS does this already, who needs a refactor tool?
slugster
2010-01-30 00:52:04
advantage of the refactor tool is that it becomes a part of the same refactoring shortcut that you use for everything else.... yeah you can make that shortcut the same but it'll be nice if it is all in one place...
Jon Erickson
2010-02-01 16:52:17
+1
A:
RefactorPro / CodeRush both have refactorings to....
- Optimize namespaces (remove unused namespaces)
- Sort Alphabetically
- Sort by length
Additionally there are (3rd party) plugins that sort in many other ways.
For example: Refactor_SortNamespacesByScope
Additionally, although the asker does not require this, these products also work VS2005.
Rory Becker
2010-02-01 08:51:46
+4
A:
You can make Refactor Pro to do it your way. Open "DevExpress -> Options -> Editor -> Refactoring -> Optimize Namespace References" and set relevant options according to your preferences.
Przemaas
2010-02-01 09:10:33