Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should 'using' be inside the namespace or outside? [duplicate]

Possible Duplicate:
Should Usings be inside or outside the namespace

Are there any technical reasons for preferring this

namespace Foo
{
     using System;
     using System.IO;

instead of the default

using System;
using System.IO;

namespace Foo
{
like image 360
ConfusedNoob Avatar asked Sep 02 '11 20:09

ConfusedNoob


1 Answers

Eric Lippert explains this.

In general, they're identical.
However, using statements in the namespace can see namespaces and aliases included outside the namespace.

like image 178
SLaks Avatar answered Oct 06 '22 23:10

SLaks