1
Reply

What is Difference between NameSpace and Assembly?

Sudhir Goswami

Sudhir Goswami

Jun 18, 2013
1.6k
0

    An Assembly can contain many namespaces. A dll is an assemblyAs I said a namespace is for logical seperation. Suppose You create a class for a calculator and call it Calc. At the same time your friend also creates a class called Calc. How will you differentiate the two classes which have same name but completely different code. Here is where namespaces come in.You can put your class inside the namespace PKSDotNet and call your calc Class like this.PKSDotNet.Calc _CalcFuncts = new PKSDotNet.Calc();Your friend can use a different namepace (YourFriend)YourFriend.Calc _Calc = new YourFriend.Calc();

    thanh phan
    June 19, 2013
    0