Benefits of Removing Unused Using Directives

When you create a new a program, class, or interface (anything that has a code) in Visual Studio, using directives or assemblies are added by default. Visual Studio assumes that you will be needing these directives. But these directives cause some awkward effects on your development when they are not used.

This will accumulate as your codes grow up and unknowingly, it is slowing you down.

The Benefits of Removing Unused Directives:
  • Faster compile time.
  • Faster down static analysis.
  • Less options in the Intellisense popup (particularly if the namespaces contain lots of Extension methods).
  • Lesser size of assemblies when compiled.
  • Faster execution of program.
How To Remove Unused Directives:
  1. Right Click on the IDE.
  2. Click on the Organize Usings (see Figure 1.).
  3. Click on the Remove Unused Usings.
Figure 1: Use this option to remove Unused Usings.
























Thank you for your time. Share it with your friends!