Does importing more namespaces have an effect on performance?
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开发者_如何学运维.
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.
精彩评论