using Foo.Uber;
namespace MyStuff.Foo
{
class SomeClass{
void DoStuff(){
// I want to reference the outer "absolute" Foo.Uber
// but the compiler thinks I'm refering to MyStuff.Foo.Uber
var x = Foo.Uber.Bar();
}
}
}
我该如何解决这个问题?只是在我的名字空间内移动using语句并没有帮助。C#中的绝对/外部和内部命名空间混淆#
类似于使用Foo.Uber = FooUber; =>参见http://stackoverflow.com/questions/262469/namespace-collisions – CodingBarfield 2011-05-17 14:09:11