What are Namespaces?

Namespaces are used to group and organize classes which are somewhat related to each other. Any class created would reside under a namespace and is referenced using the namespace in other classes or modules.

namespace MyModule {
  class MyClass {
   // all things under class
  }
  class MyOtherClass {
   // all things under class
  }
}

C# Concepts Posted Mar 09, 2021

You can now show your support. 😊

We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept