Use of the Namespaces in C#

In this article we are going to learn about how to use Namespace in C#.
  • 6160

Introduction

Namespace are the elements in C# programs. Namespace are designed for the special purpose . First to structure all the project into the small modules and to make the differ classes with same name.

Namespace provides the assistance in avoiding collision between two classes. It provides uniqueness.

Example

namespace testnamaspace
{
class testprogramming
{
public static void Main()
{
Console.WriteLine("This is the simple namespace programm.");
Console.Read();
}
}
}
}

Output

namespace.jpg

© 2020 DotNetHeaven. All rights reserved.