.NET: Namespace vs. Assembly

Frequently asked question in .Net Interview “What is the difference between Assembly and a Namespace?”

Namespace: A group of managed types (classes, enums, structs, etc).One assembly can contain several namespaces.
One namespace can contain types from different assemblies.The name of the namespace is not necessarily the name of the assembly.

1.    Collection of names wherein each name is Unique.

2.   Form the logical boundary for a Group of classes.

3.    Namespace must be specified in Project-Properties.

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)

1.    It is an Output Unit.

2.    It is a unit of Deployment & a unit of versioning.

3.    Assemblies contain MSIL code.

4.    Assemblies are Self-Describing

5.    Examples of metadata, manifest.