Arvind Singh Chandel
Do unused Namespaces in c# affect run-time performance?
By Arvind Singh Chandel in .NET on Apr 14 2014
  • Munesh Sharma
    Apr, 2014 15

    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.

    • 2
  • Arvind Singh Chandel
    Apr, 2014 14

    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

    • 2
  • Ajeet Mishra
    Oct, 2015 14

    No

    • 0
  • Manish Kumar Choudhary
    Nov, 2014 21

    No.

    • 0
  • swathi kt
    Nov, 2014 21

    no

    • 0
  • Ashu Bahl
    Nov, 2014 19

    NO, but It effects the IDE performance and the compilation process of your project.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS