programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Saturday, August 22, 2015

What is Namespace in C#, need of namespace or why use namespace

What is Namespace in C#, need of namespace or why use namespace:

Namespace in C#:

In C# Name space like a container of objects. They may contain union, structure, classes, delegate and interface. The main importance of namespace in C# is for creating a hieratical organization of program. Basically System is a root namespace in C#.
In .net every programs is create with a default name space. This default namespace is called global name space. But program itself create any numbers of namespace, each of unique name.

To declare a namespace C# .net has a reserved keyword “namespace”. When we creating a new project in .net C# the one namespace is automatically adds in project.

How to create  namespace in .net C#:

Here we make a program for explain this “how to create and use a name space”.
Using System;

Namespace MyNamespaceText
Class nameSpacCSS
Public static void Main()
Console.WriteLine(“this is a new C# namespace………..”);

No comments:

Post a Comment