Microsoft StyleCop provided a warning when the using directives for namespaces are provided outside of the namespace. Is this really required as my view on this is that using dircetives for namespaces is for providing a alias name for namespace and for removing the need for providing the namespace name when a class/interface is used. I dont think it will be used for loading the assembly.
Asked
Active
Viewed 356 times
0
-
It's a choice. Personally, I have them outside. However, check this blog post for considerations regarding inside vs. outside. http://blogs.msdn.com/b/ericlippert/archive/2007/06/25/inside-or-outside.aspx – Anthony Pegram Jun 02 '10 at 04:51
-
possible duplicate of [Should Usings be inside or outside the namespace](http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace) – Massimiliano Feb 24 '12 at 03:24
1 Answers
1
It's basically your choice. But as we follow Microsoft and this is their standard it's good to have your all usings inside your name space. And also have them sorted.

Johnny
- 1,555
- 3
- 14
- 23