views:

23

answers:

1

Does importing a large number of namespaces have an impact on performance?

Specifically in C# .NET or in general?

Obviously I would not import a namespace I wasn't going to use, and i'd probably never have to import so many as to worry about performance, but this is more out of general interest than an actual, practical problem i'm facing.

+4  A: 

I guess the by import you refer to the using directive in C#.
No - it does not.
The import only affect the compiler parsing process.
It just tells the compiler the full name of the classes in the file.
It is equivalent to a fully qualified class names instead of import.

Itay
Thanks, yes I do mean using. I've been forced to use VB.NET (Shudder) last few days updating an old app in work so got the word "Imports" on the brain...Back to C# :-D
Dan Harris