Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
This refactoring applies to:
What: Sort usings.
When: You want to sort
using directives at the top of your file so that they are in alphabetical order.
Why: It makes it easier to find a using directive.
Select Edit from the menu bar.
Select Intellisense > Sort Usings.
You can also configure different settings for
usingdirectives in Tools > Options > Text Editor > C# > Advanced.