namespaceA.namespaceB.classC.methodD如何在methodD里得到它所属的类名、该类所属的名称空间?
即如何在方法D里得到这个:namespaceA.namespaceB.classC.methodD

解决方案 »

  1.   

    typeof(classC).FullName + ".methodD";
      

  2.   

    晕我是高小铭,不是铭小高呀f.u.c.k you 没商量
      

  3.   

    你在类的方法中使用this.GetType().ToString()就可以。
      

  4.   

    GetType().xxx只能得到类型的系统命名空间,我要的是自定义的命名空间路径
      

  5.   

    在你的 methodD 中用:this.GetType().FullName + ".methodD"
      

  6.   

    ASP.Test_aspx.methodD 
    ---------------------------------------这个是楼上的方法得到的。根本就不对!
      

  7.   

    在你的 methodD 中用:this.GetType().BaseType.FullName + ".methodD"行了么?