Understanding namespace

Understanding Namespaces

.Net framework is very large, there are thousands of classes. These classes of the .Net framework are organized by hierarchy of namespaces.

Generally namespaces is a logical grouping of class or group of similar type of classes for example all the classes related to file system operations are grouped together into System.IO namespaces.

So we can say that namespaces are organized into a hierarchy o logical tree. At the root of this hierarchy is system namespace. This System namespaces contains all the class for the base data types.

We can identify any class of .net framework by using full namespaces of the class.

Suppose we use the following in our code

System.IO.File

That means system.IO is the namespace and file is the class.