using MyNamespace = ConsoleApplication19Namespace.MyNamespace2;
namespace ConsoleApplication19Namespace
{
class Program
{
static void Main(string[] args)
{
MyNamespace.Myclass My = new MyNamespace.Myclass();
My.print();
MyNamespace::Myclass You = new MyNamespace::Myclass();
You.print();
}
}
namespace MyNamespace
{
class Myclass
{
public void print()
{
Console.WriteLine("This is in the ConsoleApplication.MyNamespace.Myclass");
}
}
}
namespace MyNamespace2
{
class Myclass
{
public void print()
{
Console.WriteLine("This is in the ConsoleApplication.MyNamespace2.Myclass");
}
}
}
}global::System.Console.WriteLine("what a fuck day");//这样就不会出现问题。C# 关于namespace的细节,布布扣,bubuko.com
原文:http://blog.csdn.net/ddupd/article/details/22420951