Should 'using' directives be inside or outside the namespace?

前端 未结 12 1409
长情又很酷
长情又很酷 2020-11-21 22:41

I have been running StyleCop over some C# code, and it keeps reporting that my using directives should be inside the namespace.

Is there a technical rea

12条回答
  •  忘掉有多难
    2020-11-21 22:58

    It is a better practice if those default using i.e. "references" used in your source solution should be outside the namespaces and those that are "new added reference" is a good practice is you should put it inside the namespace. This is to distinguish what references are being added.

提交回复
热议问题