System::Reflection::MemberInfo 类

MemberInfo class

提供成员的反射信息。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针在函数参数中传递。

class MemberInfo : public System::Object

Nested classes

方法

方法描述
AddAttribute(const ObjectPtr&)向集合添加属性。
get_DeclaringType() const获取声明类型。
get_FullName() const获取成员的完整名称。可能在手动实现的部分中不同。
virtual get_MemberType() const获取一个指示成员类型的 System::Reflection::MemberTypes 值——方法、构造函数、事件等。
get_Name() const获取成员名称。
get_ReflectedType() const获取反射类型的类型。
GetCustomAttributes(const TypeInfo&, bool) const返回一个数组,包含表示当前对象所代表类型上应用的所有自定义属性的对象。
GetCustomAttributes(bool) const返回一个数组,包含表示当前对象所代表类型上应用的所有自定义属性的对象。

Typedefs

类型定义描述
ObjectPtr指向 Object 的共享指针的别名。

另见