C# Remove Unused “using”

After we developed some codes in C#, especially in a big project, there will always be a lot of “using” stated at the top of your source code, sometimes most of them are not really used at all, so, why don’t you just get rid off it and have a tidier source code? 🙂

So this is my code before removal:

And just right click on your mouse, and select this menu

After that, you can see most of the unused using is already gone 🙂

But kindly take a note, that this is not improving your program’s performance at all, because .NET already handle it in assembly so it will remove the unused using in the compilation time. But since there’s no performance improvement, why should we do this? Ok, let say you want to hands your work to another person, it will be easier for them to understand which reference should they have and which not. And also it will improve the time for the mighty Intellisense to load.


Leave a Reply

Your email address will not be published. Required fields are marked *