tinoymalayil 0 Report post Posted August 2, 2010 Hi,What is actually namespace in C#?..is it similar to packages in java used to group a set of classes.or is it using to avoid conflict in giving names to classes?.Can anyone give a suitable answer to this? Share this post Link to post Share on other sites
vinods 0 Report post Posted March 1, 2011 Namespace is the collection of classes that we use in the application. one namespace having more than 1 classessystem is the root namespace for all the application in c#.for e.g system.FileIO this namespace is content streamreader & streamwriter classes that we use to reading & writing oparation of file in the application. Share this post Link to post Share on other sites
k_nitin_r 8 Report post Posted March 25, 2011 Hi!Namespaces in .NET are analogous to packages in Java. They enable you to create classes with names that are similar and help in avoiding naming conflicts. They also help in maintaining consistency between class names. The concept of namespaces was probably borrowed from C++ and Java, so it isn't unique to the .NET platform.For example, the class OracleConnection is present within Oracle.DataAccess.Client, from the ODP.NET library provided by Oracle, as well as System.Data.OracleClient, the Oracle database access client library provided by Microsoft. By usin the appropriate namespace, such as by importing only one of the two namespaces or by using the fully-qualified name of the class, you can easily switch between the two classes. Share this post Link to post Share on other sites
iGuest 3 Report post Posted June 4, 2012 Namespaces are the way to organize .NET Framework Class Library into a logical grouping according to their functionality, usability as well as category they should belong to, or we can say Namespaces are logical grouping of types for the purpose of identification.The .NET Framework Class Library (FCL ) is a large collection of thousands of Classes. These Classes are organized in a hierarchical tree.Robert Share this post Link to post Share on other sites
Nazi 0 Report post Posted June 27, 2012 Namespaces are basically used to organize your code. Its main goal is to create a hierarchical organization of the program and it also assists in avoiding the name clashes between the different sets of code.In .net, all programs are created with default namespace which is global namespace. A program can have any number of namespaces but each namespace should have a unique name. Share this post Link to post Share on other sites