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
One wrinkle I ran into (that isn't covered in other answers):
Suppose you have these namespaces:
When you use using Something.Other
outside of a namespace Parent
, it refers to the first one (Something.Other).
However if you use it inside of that namespace declaration, it refers to the second one (Parent.Something.Other)!
There is a simple solution: add the "global::
" prefix: docs
namespace Parent
{
using global::Something.Other;
// etc
}