简体   繁体   中英

Does the order in which the using directives are listed affect performance of the class?

This might seem like a silly question, but I have always wondered if the order in which the using directives (for namespaces) are listed at the top of the class affect the performance of the code running in it? Or does it just affect compile time/performance?

No, because there is no norder of a using statement because there is no using statement in a class.

It is purely for the compiler. The using statement does not exist in the bytecode at all.

No, those directives are only needed while writing code and during compilation. You won't find any traces of them afterwards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM