Coding standard question: using directive & namespace

  • Thread starter Thread starter Keith Patrick
  • Start date Start date
K

Keith Patrick

There's a relatively recent coding guideline that Brad Abrams posted:
"Using statements should be inside the namespace declaration."

No explanation was given, and the only MS code that I've seen that actually
does that is wizard-generated ASP.Net UserControl code. Does anyone know
what the reason for that standard is? I've read the specs on both keywords
as well as the comments for that blog topic
(http://blogs.msdn.com/brada/articles/361363.aspx), but I cannot find any
explanation.
 
I can think of no reason to do this. IMHO, It's personal preference.

(I'd love to know if I'm wrong ... )
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Crap...guess this will be a mystery for a while. I asked Brad Abrams, but
haven't heard back from him. I'm pretty disappointed that he'd put in a
standard like that without some kind of "why", especially in light of the
fact that there are thousands of classes out there that are "breaking" this
rule due to a lack of explanation about the differences between the two and
the abundance of MS-supplied sample code that does not adhere to that
standard. I'm tempted to change the 1000+ classes in my current set of
libraries, but I don't want to put forth that kind of effort without knowing
a reason for it, especially if people *at* Microsoft don't even know why :)
 
Back
Top