A Namespace in Microsoft .Net is like containers of objects. They may contain unions,
classes, structures, interfaces, enumerators and delegates. Main goal of using
namespace in .Net is for creating a hierarchical organization of program. In this
case a developer does not need to worry about the naming conflicts of classes,
functions, variables etc., inside a project.
In Microsoft .Net, every program is created with a default namespace. This default
namespace is called as global namespace. But the program itself can declare any
number of namespaces, each of them with a unique name. The advantage is that every
namespace can contain any number of classes, functions, variables and also namespaces
etc., whose names are unique only inside the namespace. The members with the same
name can be created in some other namespace without any compiler complaints from
Microsoft .Net.
To declare namespace C# .Net has a reserved keyword namespace. If a new project is
created in Visual Studio .NET it automatically adds some global namespaces. These
namespaces can be different in different projects. But each of them should be placed
under the base namespace System. The names space must be added and used through the
using operator, if used in a different project.
using System;
namespace OutNamespace
{
namespace WorkNamespace
{ /// can be placed some classes, structures etc.
}
}
this example we create two namespaces. These namespaces have hierarchical structure.
We have some outer one named OutNamespace and the inner one called WorkNamespace.
The inner namespace is declared with a C# .Net class WorkItem.
Eliminating the Time Wasters
The Time-wasters will surround you all the sides and will tear away at your minutes and
hours, holding the back from producing a critical results which are vital to the success
in the career.
Eliminate a time wasters in life;
The Law of an Excluded Alternative;
Identify a major time-wasters;
Practical ways to overcome and avoid them if possible.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords Net C# Tutorial Namespaces, web services tutorial, c# web services, sql server tutorial,
c# web service, visual basic tutorial, web service net, c# sample code, windows forms net,
windows forms c#, c# source code, visual studio net, visual basic net, source code tutorial,
visual studio c#, visual basic c#, net sample code, net source code,