© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•8mo ago•
3 replies
Faker

✅ Solution, namespace, using statements

Hello, I always forgot about the differences between a solution vs namespace and why we make use of the
using
using
statements. I want to clarify that. From what I know, a
solution
solution
is just there to show us how are projects are organised, whether Project A is inside Project B or which Projects do we have, whether these are C,D and E.

Now, the
namespace
namespace
is misleading, what does it do? From what I've understood, when we create a C# file, we use a namespace to "logically" group it so basically, it refers to the project we are currently working? (What about C# files with top level statements? Do they have a namespace by default?)

For example, say we have project A,B and C. Each one will have their namespace? I'm a bit confused about that. When we create multiple classes, do they have multiple namespaces or just the namespace of the project?

One thing I noticed, sometimes, we declare namespace as:
namespace name {...}
namespace name {...}
but sometimes, we simply write
namespace name;
namespace name;
, these 2 are similar?

For the
using
using
keyword, I did understand that in order to use particular things in particular namespace, we must first make them available where we are currently is so that we can reference them, that's why we use the
using
using
keyword? Without this keyword will it still be possible to reference them, like typing full name,
System.Generic...
System.Generic...
?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Namespace can't find solution when using it
C#CC# / help
2y ago
using Namespace; (Problem)
C#CC# / help
3y ago
✅ Namespace does not recognize my other solution
C#CC# / help
2y ago
Top-Level statements must precede namespace and type declarations
C#CC# / help
3y ago