In a visual studio 2008 solution, I have two versions of the same class in two different namespaces.
In VB, if I do this:
imports MyNamespace
' ...
dim x as DuplicatedClass = new DuplicatedClass()
it uses MyNamespace.DuplicatedClass instead of the globally-namespaced DuplicatedClass. Meanwhile, in C#, doing this:
using MyNamespace;
// ...
DuplicatedClass x = new DuplicatedClass();
uses the globally-namespaced DuplicatedClass. To use the other version, I have to use MyNamespace.DuplicatedClass
.
I realize this is a problematic setup, but I can't change it. Is there a way to prevent C# from seeing the globally namespaced class, or to specifically un-load it, or...? Given how many classes are in the global namespace, being forced to choose the namespace every time could get pretty time-costly.