C#中使用namespace语句排序语句、namespace

2023-09-03 07:16:18 作者:路亽曱

我想我读的地方,你使用的语句,并摆脱未使用的有一些什么样的性能效益订购...但我似乎无法找到任何证据或资源来支持......有没有道理这样做呢?

I thought I read somewhere that ordering your using statements and getting rid of unused ones had some kind of performance benefit...but I can't seem to find any evidence or resources to support that...is there any truth to this?

推荐答案

从的 MSDN

使用名称空间指示的   同一编译单元或命名空间   身体不互相影响,并能   用任何顺序

using-namespace-directives in the same compilation unit or namespace body do not affect each other and can be written in any order.

非常多useful链接 你想参观。

Very much useful link you would like to visit.