Interviews6 answers
Do unused Namespaces in c# affect run-time performance?
6 Answers
No
Ajeet MishraPosted Oct 14, 2015, 2:27 AM EDT
No.
Manish Kumar ChoudharyPosted Nov 21, 2014, 2:08 AM EST
no
swathi ktPosted Nov 21, 2014, 1:58 AM EST
NO, but It effects the IDE performance and the compilation process of your project.
Ashu BahlPosted Nov 18, 2014, 7:29 PM EST
NO, but It effects the IDE performance and the compilation process of your project. I can give you a short example. If you have ever used coderush http://devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/ which is from devexpress, their IDE optimizer and code optimizer will also suggest you to remove unused namespaces.
Update: Here is more use information from Dmitriy's Blog There are few reasons why you should remove unused usings in you C# code.
Munesh SharmaPosted Apr 15, 2014, 12:59 AM EDT
Answer is They Don't.
Because They're just a compile-time constant to allow the compiler to recognize types without specifying their full name explicitly.
It is useless code, that just creates clutter in your source code and it also confusing for the developer because you don't know which namespaces are actually used.
Over time as your code changes it can accumulate a lot of unused using statements which create even more clutter in you code.
It can make your compiling faster, since compiler does not have to look up all those extra unused namespaces.
It will help avoid name conflict with new items that you going to add to your solution if both of those have same names.
It will reduce number of items in your Visual Studio editor auto completion
for more detail about Removing Unused Usings please visit ?
http://msdn.microsoft.com/en-us/library/bb514115.aspx
Arvind Singh ChandelPosted Apr 14, 2014, 5:45 AM EDT


