As the name suggests, name-space is designed to differentiate the one set of names from another. With the help of namespace we can organize our program by making a group of classes, delegates, interfaces, enumerations or structures.
Example :
namespace MindStick { public
class demo { public
int demo1() { return
1; } } }
Nested name_space
Below is the example to represent Nested Namespace
namespace Name_Demo { class Program { public int demo1() { return 1; } } namespace n3 { using Name_Demo; class b:Program { static void Main(string[] args) { } } } }
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Namespaces
As the name suggests, name-space is designed to differentiate the one set of names from another. With the help of namespace we can organize our program by making a group of classes, delegates, interfaces, enumerations or structures.
Example :
Nested name_space
Below is the example to represent Nested Namespace
For more details click here: Namespace, Namespace and Class