Namespace
explain namespace in detail ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 11, 2014, 9:40 AM EST
They also help to resolve name clashes. If two classes in different namespaces have the same name, then you can qualify the class name by its namespace (i.e. namespace.classname) so the compiler knows which one you mean.
Namespaces can be nested within each other.
The classes or other types in a particular namespace can be imported into a C# source code file by means of the 'using' directive:
using MyNamespace;
This means that all classes in MyNamespace can be used without qualification unless, of course, you need to resolve a name clash.