Interview Question
Qus: What is the difference between namespace and assembly?
1. Namespace is the logical naming decided at design time by the developer whereas scope for a particular type is defined at run time using Assembly.
2. Namespace contains set of unique names whereas assembly contains code of the form MSIL ( Microsoft Intermediate Language)
3. Classes available in your program will be logically grouped together under a namespace whereas logical units are physically grouped together as assembly.
4. Namespace can include multiple assemblies whereas an assembly can contain types belonging to different namespaces.
5. Namespace doesn't have any classification whereas assembly can be classified as private assembly and public assembly. Private assembly is specific to a single application but shared/public assembly contains libraries which can be used by multiple applications.
6. Namespaces have to be mentioned in Project-Properties whereas assemblies need not be explicitly specified. They are automatically described in metadata and manifest files.
7. Namespaces can be nested whereas nesting is not permissible in assemblies.
2. Namespace contains set of unique names whereas assembly contains code of the form MSIL ( Microsoft Intermediate Language)
3. Classes available in your program will be logically grouped together under a namespace whereas logical units are physically grouped together as assembly.
4. Namespace can include multiple assemblies whereas an assembly can contain types belonging to different namespaces.
5. Namespace doesn't have any classification whereas assembly can be classified as private assembly and public assembly. Private assembly is specific to a single application but shared/public assembly contains libraries which can be used by multiple applications.
6. Namespaces have to be mentioned in Project-Properties whereas assemblies need not be explicitly specified. They are automatically described in metadata and manifest files.
7. Namespaces can be nested whereas nesting is not permissible in assemblies.