Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   ASP (http://siteownersforums.com/forumdisplay.php?f=11)
-   -   What is namespaces In .NET ? (http://siteownersforums.com/showthread.php?t=134458)

sansoni1 11-08-2013 12:18 AM

What is namespaces In .NET ?
 
Namespace is a Keyword used declare a Scope. If you do not declare a namespace, a default namespace will be created. this unnamed namespace some times called Global namespace, this will created every file.

shaadisankalp01 11-28-2013 09:45 PM

Using system;
Class A
{
show()
{
System.Console.WriteLine("Hello World!");
}
}

Die_heart 01-02-2014 12:08 AM

Namespace is a Keyword used declare a Scope

alligatortek001 02-26-2014 06:22 AM

Quote:

Originally Posted by sansoni1 (Post 346469)
Namespace is a Keyword used declare a Scope. If you do not declare a namespace, a default namespace will be created. this unnamed namespace some times called Global namespace, this will created every file.

Namespace is logical division of class, structure and interface OR way to organize your .NET code is through the use of namespaces
Namespaces are a way of grouping type names and reducing the chance of name collisions.
namespace ExampleNamespace
{
class TestExample
{
public void ShowMessage()
{
Console.WriteLine("This is the TestExample namespace!");
}
}
}

stingoperationp 03-12-2014 02:18 AM

Namespace is simply a large collection of classes. If you do not enter any name space it will be global automatically. So all classes are the sub class of namespace

kiwistech 03-12-2014 02:53 AM

Namespace basically declares the scope of that particular keyword for example that particular keyword's property is private, public or if there is no namespace it means the keyword is global and any class can use it.

To the best i know.

BenjaminMayer 06-05-2015 06:02 AM

NameSpace is a logical group of type or we can say that namespace is a container of class, interface, structure etc.It reduces the chance of name collisions.Namespace with all the functionality come under system namespace. It organize large block of code and they are delimited by using the . operator. using directives are used in namespace.

zinist 07-13-2015 03:13 AM

Hi,
A namespace is used to organize your code and is collection of classes, interface, structs, enum and delegate.
Thanks


All times are GMT -7. The time now is 04:50 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.