What are namespaces, and how they are used?

Answer

Namespaces are used to organize classes within the .NET Framework. They dictate the logical structure of the code. They are analogous to Java packages, with the key difference being Java packages define the physical layout of source files (directory structure) while .NET namespaces do not. However, many developers follow this approach and organize their C# source files in directories that correlate with namespaces. The .NET Framework has namespaces defined for its many classes, such as System.Xml--these are utilized via the using statement. Namespaces are assigned to classes via the namespace keyword.

All c sharp Questions

Ask your interview questions on c-sharp

Write Your comment or Questions if you want the answers on c-sharp from c-sharp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---