freshers/Experienced Dotnet jobs

06/07/2011

Difference between Namespace & Assembly


1 comment:

  1. A namespace is just a grouping of related classes. It's a method of putting classes inside a container so that they can be clearly distinguished from other classes with the same name.The physical grouping is accomplished by an assembly, which equates most directly to a dynamic link library (DLL), COM object, or OCX module.
    The .NET CLR contains multiple namespaces, which are spread across many assemblies. For example, ADO.NET is the set of classes located in the System.Data namespace, and ASP.NET is the set of classes located in the System.Web namespace.
    In Visual Studio .NET, code is physically organized and structured in assemblies. An assembly is almost identical to a DLL, although one assembly consists of one or more DLL or EXEs.
    one assembly can contain one or more namespaces, and one namespace can be contained by one or more assemblies. Each assembly can be configured with a root namespace. If the root namespace value is left blank, the root namespace value defaults to the assembly name.


    Differences:
    1)A namespace is logically groups classes.An assembly is physical grouping of logical units.
    2)An Assembly contains one or more namespaces.

    ReplyDelete