1

Most of my previous experience has been in C++, but I recently began working a lot in C# and I was wondering what, if any, difference additional, unused, using statements have on compile times. In C++, including additional header files can increase the time it takes to compile an application, so I was wondering if the same could be said of C#. For example, imagine you included the following at the top of a source file:

using System;
using System.Linq;
using System.Web.UI;

Further, imagine that you weren't actually using anything from System.Linq. Would including the using statement for System.Linq effect the time it take to compile a project? Does it have any effect on the file at all besides pulling in the namespace?

Thanks!

jhammond
  • 1,916
  • 2
  • 15
  • 29
  • One thing to note is that you can right click on the `using` statements, "organize usings" -> "remove unused usings" to clean up all the `using`s in the file. – Jacob Lambert Jan 27 '15 at 18:12
  • Possible duplicate or related: [Why should you remove unnecessary C# using directives?](http://stackoverflow.com/questions/136278/why-should-you-remove-unnecessary-c-sharp-using-directives) and see [this answer](http://stackoverflow.com/a/136646/961113) – Habib Jan 27 '15 at 18:13

0 Answers0