Support us .Net Basics C# SQL ASP.NET Aarvi MVC Slides C# Programs Subscribe Download

Part 1 - How to remove unused using namespaces

In this video we will discuss, 
1. How to remove unused Usings
2. Will performance be an issue, if there are unused Usings
3. What are the benefits of removing unused Usings



How to remove unused Usings
How to remove unused using namespaces
1. Right click anywhere on the page
2. Hover mouse over "Organize Usings" option from the context menu
3. You will then presented with the following 3 options
    a) Remove Unused Usings
    b) Sort Usings
    c) Remove and Sort



If you prefer to use keyboard shortcut, use 
keyboard shortcut to remove unused usings

Will performance be an issue, if there are unused Usings
No, there won't be any impact on the application performance. The unused Usings will simply be ignored.

What are the benefits of removing unused Usings
1. Cleaner code, which in turn makes it easy to read and maintain
2. IntelliSense runs faster as there are less items to look through. This also means the developer has few options to select from.
3. Faster compilation because the compiler has fewer namespaces to lookup types to resolve.
4. Avoids name collision in future when new types are added to the unused namespaces that have the same name as some types in the used namespaces.

visual studio tips and tricks tutorial

No comments:

Post a Comment

It would be great if you can help share these free resources