Linked Questions
74 questions linked to/from Should 'using' directives be inside or outside the namespace in C#?
23 votes
3 answers
23k views
Is sa1200 All using directives must be placed inside the namespace (StyleCop) purely cosmetic? [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace sa1200 All using directives must be placed inside the namespace (StyleCop) Is this just for code readibility or is there any ...
11 votes
3 answers
8k views
Place usings inside or outside of namespace [duplicate]
I was learning MVC WebAPI and I was following a tutorial and everything was going fine untill I saw the following: namespace HelloWebAPI.Controllers { using System; public class ...
14 votes
2 answers
2k views
.NET namespaces and using statements [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace What is the difference between namespace x { using y; } and using y; namespace x { } ?
7 votes
3 answers
3k views
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 ...
6 votes
1 answer
8k views
Using statements before or after Namespace in C# [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace So there are two approaches to where you have your using statements in regard to the namespace. You can either have them ...
7 votes
3 answers
2k views
"using" statement locations within namespace declarations [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace I'm supporting some code that, unusually, has all its using statements contained within the namespace declaration. It makes me ...
7 votes
3 answers
872 views
Organizing using directives [duplicate]
I've been using ReSharper for the past months and, advertising aside, I can't see myself coding without it. Since I love living on the bleeding "What the hell just went wrong" edge, I decided to try ...
4 votes
5 answers
2k views
c# using statements placement [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace I am looking at a code base where the author (one I respect) consistently places using statements inside of the namespace, as ...
3 votes
2 answers
2k views
When do we need to put using directives inside a namespace scope? [duplicate]
I don't know why Asp.net MVC developers put the using directives inside System.Web.Mvc namespace as follows. namespace System.Web.Mvc { using System; using System.Collections.ObjectModel; ...
5 votes
1 answer
7k views
Why put using statements inside the namespace in C#? [duplicate]
I've noticed some C# code has the using statements within the namespace instead of at the top of the file. For example, instead of this: using System; namespace SomeClassNameSpace { public class ...
1 vote
3 answers
248 views
.net : namespace : what is exact difference in writing USING directives before or after namespace [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace .NET namespaces and using statements What is exact difference in writing USING directives before or after namespace ...
1 vote
0 answers
248 views
Using - inside namespace or outside namespace [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace We all, I think, write usings and then namespace at the beggining of a class. I just saw a code that the namespace comes first. ...
0 votes
1 answer
59 views
using references inside a namespace vs root level [duplicate]
What's the advantage of doing this: namespace a { using System; class ClassA { } } over this using System; namespace a { class ClassA { } } is there any performance ...
0 votes
0 answers
118 views
Does it matter whether using statements are above or below the namespace declaration? [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace I've noticed that sometimes lately when I've used Visual Studio's "Resolve" feature to add using statements to a class or unit, ...
1 vote
0 answers
87 views
What's the difference of different location of "using statement"? [duplicate]
Possible Duplicate: Should Usings be inside or outside the namespace Hi, friends, What's the difference between the following 2 code snippets? The using statement is located differently. ...