Quantcast
Viewing all articles
Browse latest Browse all 21

#1,185 – Managing using Directives, part II

You can add missing using directives by using the Resolve command.  You can also clean up the current list of using directives in a file, removing the ones that are no longer needed.

You can remove unneeded using directives by clicking anywhere within a file and selecting Organize Usings | Remove Unused Usings.

In the example below, we start out with 20 using directives at the top of the file.

Image may be NSFW.
Clik here to view.
1159-001

We then select Remove Unused Usings.

Image may be NSFW.
Clik here to view.
1159-002

After we execute this command, we’re left with only four using directives at the top of the file.

Image may be NSFW.
Clik here to view.
1159-003


Filed under: Visual Studio Tagged: C#, using Directive, Visual Studio Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 21

Trending Articles