Hi,
I have two namespaces:
1) Foo.Bar
2) Another.Foo.Bar
From a class in namespace 2, how do I reference a class in namespace 1? Using Foo.Bar leaves you in namespace 2 still...
I hope this is reasonably clear!
Thanks.
Hi,
I have two namespaces:
1) Foo.Bar
2) Another.Foo.Bar
From a class in namespace 2, how do I reference a class in namespace 1? Using Foo.Bar leaves you in namespace 2 still...
I hope this is reasonably clear!
Thanks.
You need to use the global qualifier.
Just add:
using GFooBar = global::Foo.Bar;
Then refer to it as:
GFooBar.MyClass = new GFooBar.MyClass();
or
global::Foo.Bar.MyClass = new global::Foo.Bar.MyClass();