.父类里 直接 this.GetType().Name
获取到子类,就可以得到子类的Attribute
例如
Type chindType = this.GetType() ;//获取子类的类型
childAttr = Attribute.GetCustomAttribute(chindType, typeof(childClassLoginAttribute), false) as childClassLoginAttribute; //childClassLoginAttribute为自定义的Attribute
转载请注明原文地址: https://ju.6miu.com/read-1277.html