Quantcast
Viewing all articles
Browse latest Browse all 10

Meaning of Namespace in C#

What is the meaning of Namespace in c#?

Namespace has two basic functionality:

1) Namespace has Logically Group Types, example System.web.UI logically groups UI related features.

2) In the Object Oriented World, Many times it is possible that programmers will use the same class name. qualifying the namespace with class name can avoid this collection.

Example: for eg.
There is two companies like A and B and there is two employees like P and S.
Now its one to one mapping.
it means P is the employee of A and S is the Employee of B. If P's Id is 111 and S's Id's also 111.
here we can identify that P and S are the employees of different companies,but if suppose there were the same id's of two employees in the same companies,then we are not able to identify it.
so to remove these sort of issues we can make grouping as like namespace which gives us the logically related identifiers into corresponding namespaces.

Viewing all articles
Browse latest Browse all 10

Trending Articles