If two assemblies define namespace Aone containing class A1, then two classes are considered unique types.
a) Are these namespaces also unique?
b) If there program Pis a link to both assemblies, how do we create instances of two types? Namely, I keep getting an error when I try to create an instanceA.A1
using A;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
A1 a = new A1();
}
}
}
c) But if it program Palso defines type B.A1, then the compiler does not complain when I declare an instance A1:
using A;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
A1 a = new A1();
}
}
class A1 { }
}
The ifnt compiler does not compile, since it does not know which version to A1use ( A.A1from one of the referenced assemblies or B.A1)?
thank