Series: Subject: Topic:
Question: 100 of 169

What is the difference between a namespace and assembly name?

A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code.
The concept of a namespace is not related to that of an assembly. A single assembly may contain types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.
Asked by: Interview Candidate | Asked on: Sep 7th, 2004
Showing Answers 1 - 3 of 3 Answers

Answered On : Jan 27th, 2006

View all questions by sahu   View all answers by sahu

Ans:The Above CommentsNamespace: It is a Collection of names wherein each name is Unique.They form the logical boundary for a Group of classes.Namespace must be specified in Project-Properties.An assembly An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files)

Login to rate this answer.
rajnish singh

Answered On : Jul 23rd, 2009

View all answers by rajnish singh

Namespace - It is a logical group of classes means it defines boundary for
In a single program 2 namespace cannot be have same name.

Assemblies - These physical structure of coding and it can store manifest (metadata).
Assembly can be of same name in the same program.  It is the output unit.

Login to rate this answer.

Namespace actually stores assemblies through a common name. For example if System is a namespace it stores various methods stored in assembly named Console like WriteLine, ReadLine and so on.Assembly is the name for a dll file that can be used to refer the assembly in an application. If Assemblies and Namespaces can be compared with Directories and files then Assembly is a filename with some content like text/image while Namespace is the directory to store filenames and other directories.

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.