“ using”指令应该在名称空间之内还是之外?

|▌冷眼眸甩不掉的悲伤 提交于 2020-08-06 09:48:35

问题:

I have been running StyleCop over some C# code, and it keeps reporting that my using directives should be inside the namespace. 我一直在通过某些C#代码运行StyleCop ,并且一直在报告我的using指令应该在名称空间内。

Is there a technical reason for putting the using directives inside instead of outside the namespace? 是否有技术上的理由将using指令放在名称空间的内部而不是外部?


解决方案:

参考一: https://stackoom.com/question/WbH/using-指令应该在名称空间之内还是之外
参考二: https://oldbug.net/q/WbH/Should-using-directives-be-inside-or-outside-the-namespace
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!