diff between name space & assembly
main diff between namespace and assembly??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Aug 3, 2012, 1:55 AM
Namespace is a logical naming scheme for group related types.Some class types that logically belong together they can be put into a common namespace. They prevent namespace collisions and they provide scoping. They are imported as "using" in C# or "Imports" in Visual Basic. It seems as if these directives specify a particular assembly, but they don't. A namespace can span multiple assemblies, and an assembly can define multiple namespaces. When the compiler needs the definition for a class type, it tracks through each of the different imported namespaces to the type name and searches each referenced assembly until it is found.
* An Assembly is a logical unit of code
* The constituent files can include any file types like image files, text files etc. along with DLLs or EXEs* Assembly physically exist as DLLs or EXEs
* One assembly can contain one or more files
* When you compile your source code by default the exe/dll generated is actually an assembly
* Unless your code is bundled as assembly it can not be used in any other application
* When you talk about version of a component you are actually talking about version of the assembly to which the component belongs.
* Every assembly file contains information about itself. This information is called as Assembly Manifest.
Thanks
Jaganathan BantheswaranPosted Aug 2, 2012, 2:12 AM
Namespace:
• To structure the project into meaningful pieces
• To distinguish classes with the same name
Assembly:
An assembly is a file that is automatically generated by the compiler upon successful compilation of every .NET application. It can be either a Dynamic Link Library or an executable file
Know more here:
http://stackoverflow.com/questions/5915033/use-of-namespaces-in-c-sharp
http://www.c-sharpcorner.com/uploadfile/ggaganesh/workingwithnamespaces11082005070923am/workingwithnamespaces.aspx
http://www.codeguru.com/columns/csharp_learning/article.php/c5845/C-FAQ-15--What-is-an-Assembly.htm
Atul KumarPosted Jul 27, 2012, 7:46 AM
You define namespace for classes using keywords
namespace MyNamespace
{
}
in an assemply and assembly is compiled into .dll file.