Namespaces and Class Libraries
Learn to organize code with namespaces, use file-scoped syntax, import types, and resolve naming conflicts in .NET applications.
User-defined classes and structures do not exist in isolation. They are enclosed in containers called namespaces.
When we define a class, we usually place it inside a namespace to organize our code and prevent naming conflicts. The name of this namespace often matches the project name.