命名空间别名

using System;

using Introduction=Wrox.A

class Text

{

  public static int Main()

  {

    Introduction::NamespaceExample NS=new Introduction::NamespaceExample();

    Console.WriteLine(NS.GetNamespace());

    return 0;

  }

}

 

namesapce Wrox.A

{

  class NamespaceExample

  {

    public string GetNamespace()

    {

      return this.GetType().Namespace;

    }

  }

}

posted @ 2010-06-30 21:22  痕迹  阅读(89)  评论(0)    收藏  举报