Should all directives used for namespaces be inside the namespace?

Microsoft StyleCop provided a warning when using directives for namespaces are provided outside of the namespace. This is really necessary since my view on this is that using dircetives for namespaces is intended to provide an alias for the namespace and to eliminate the need to provide a namespace name when using a class / interface. I do not think it will be used to load the assembly.

0
source share
1 answer

This is basically your choice. But as we follow Microsoft, and this is their standard, it's good to have all of your actions inside your namespace. And also sort them.

+1
source

Source: https://habr.com/ru/post/1792720/


All Articles