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.

Showing Answers 1 - 7 of 7 Answers

Ans:

The Above Comments

Namespace: 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)

  Was this answer useful?  Yes

Namespace - It is a logical group of classes means it defines boundary for
classes.
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.


  Was this answer useful?  Yes

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.

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions