Q
qglyirnyfgfo
Suppose that you have two dlls (ClassLibrary1.dll and
ClassLibrary2.dll).
Now suppose that both dlls have the same class declared on them using
the exact same name space and class name, for example, supposed both
dlls have the following snippet of code:
namespace SomeNameSpace
{
public class Class1
{
}
}
Now supposed you reference both dlls into your main project and add
the following snippet of code into this main project.
SomeNameSpace.Class1 cls = new SomeNameSpace.Class1();
If you try to compile the project you will get an error message
stating that “SomeNameSpace.Class1()” exist in both dlls and so the
compiler can’t choose which one to select.
Is there a way to specify what dll to use when instantiating Class1?
Thank you.
ClassLibrary2.dll).
Now suppose that both dlls have the same class declared on them using
the exact same name space and class name, for example, supposed both
dlls have the following snippet of code:
namespace SomeNameSpace
{
public class Class1
{
}
}
Now supposed you reference both dlls into your main project and add
the following snippet of code into this main project.
SomeNameSpace.Class1 cls = new SomeNameSpace.Class1();
If you try to compile the project you will get an error message
stating that “SomeNameSpace.Class1()” exist in both dlls and so the
compiler can’t choose which one to select.
Is there a way to specify what dll to use when instantiating Class1?
Thank you.