Out of curiosity, I've created 2 assemblies which both have a class (Class1
) with the exact same namespace (Library1
). I then create another client referencing those 2 assemblies and try to create an instance of Class1
.
The compiler, not surprisingly, gives me a compile-error about the ambiguous reference. Is there any way to explicitly specify the type in the assembly I want to use to avoid the ambiguity?
Note: I know this rarely, if ever at all, happens in practice. It's just a question out of curiosity about language feature.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…