What is the difference between namespace and assembly?

1 votes
128 views
Tarun Kumar asked 14-Nov-2017 in programming by Tarun Kumar

What is the difference between namespace and assembly?

1 Answer

0 votes
Arti Mishra answered 07-Aug-2018 by Arti Mishra
Difference between namespace and assembly
                    Namespace
      •  In .net programming language namespace provide the logical grouping of code.
      •  The namespace avoid the conflict of user-defined classes.
      • It is a Collection of names where each name is Unique in the whole project.

      Assembly
      •  It provides the physical grouping of code.
      • An assembly can contain multiple namespaces .
      •  Assemblies contain MSIL (Microsoft Intermediate Language) code.
      •  Assembly defines the name of the .dll extension file. It also used to avoid dll hell problem.
      •  Assemblies are Self-Describing. [E.g. metadata, manifest]
      •  It is the primary building block of a .NET Framework application.