开发者

Does importing more namespaces have an effect on performance?

开发者 https://www.devze.com 2023-01-06 15:47 出处:网络
Does importing a large number of namespaces have an impact on performance? Specifically in C# .NET or in general?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号