Class to Demonstrate Namespace
Users Online
· Guests Online: 146
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
Forum Threads
Newest Threads
No Threads created
Hottest Threads
No Threads created
Latest Articles
Articles Hierarchy
C# Program to Implement Namespaces
C# Program to Implement Namespaces
This is a C# Program to implement namespaces.
Problem Description
This C# Program Implements Namespaces.
Problem Solution
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.
Program/Source Code
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(); } }
Program Explanation
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.
Runtime Test Cases
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.