What are Namespaces?

As I explained in a previous FAQ, namespaces are placed at the top of the .NET hierarchy. Namespaces are nothing but group of classes or types or assemblies. Each of these classes contains lot of methods. Basically, namespaces are treated as containers for all classes and are classified into several categories, based on its functionalities. For example, if you need to work with databases, you have to call the namespace System.Data. Similarly, if you are working with files you have to call System.IO namespace.

Namespaces in C# are similar to packages in Java, where we will use a statement like java.sql.* Moreover, all C# programs should call System namespace. This is the root of all other namespaces in the .NET Framework.

Pages: 1 2

READ  What do you mean by .NET Framework Class Libraries?

One Response to "What are Namespaces?"

  1. optimization search   October 9, 2014 at 7:45 pm

    It’s hard to come by educated people in this particular topic, but you seem like
    you know what you’re talking about! Thanks

    Reply

Leave a Reply

Your email address will not be published.