Class to Demonstrate Namespace
This is a C# Program to implement namespaces.
This C# Program Implements Namespaces.
Here namespaces are used to logically arrange classes, structs, interfaces, enums and delegates and keyword namespace is required to create a user defined name space.
Here is source code of the C# Program to Implement Namespaces. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
/* * C# Program to Implement Namespaces */ using System; namespace Sanfoundry.Csharp.Codes { class TestClass { public TestClass() { Console.WriteLine("Class to Demonstrate Namespace"); } } } class MyClient { public static void Main() { Sanfoundry.Csharp.Codes.TestClass mc = new Sanfoundry.Csharp.Codes.TestClass(); Console.ReadLine(); } }
This C# Program is used to Implement Namespaces. Here the namespaces are used to logically arrange classes, structs, interfaces, enums and delegates and keyword namespace is required to create a user defined name space.
Class to Demonstrate Namespace