These enum values are returned by Type.MemberType and are useful in switch statements. MemberTypes matches CorTypeAttr as defined in the corhdr.h file.
To obtain the MemberTypes value for a method:
First get a Type.
From the Type, get the MemberInfo array.
From the MemberInfo array, get the MemberType.
Member Name | Description |
---|---|
All |
Specifies all member types. |
Constructor |
Specifies that the member is a constructor, representing a System.Reflection.ConstructorInfo member. Hexadecimal value of 0x01. |
Custom |
Specifies that the member is a custom member type. Hexadecimal value of 0x40. |
Event |
Specifies that the member is an event, representing an System.Reflection.EventInfo member. Hexadecimal value of 0x02. |
Field |
Specifies that the member is a field, representing a System.Reflection.FieldInfo member. Hexadecimal value of 0x04. |
Method |
Specifies that the member is a method, representing a System.Reflection.MethodInfo member. Hexadecimal value of 0x08. |
NestedType |
Specifies that the member is a nested type, extending System.Reflection.MemberInfo. |
Property |
Specifies that the member is a property, representing a System.Reflection.PropertyInfo member. Hexadecimal value of 0x10. |
TypeInfo |
Specifies that the member is a type, representing a MemberTypes.TypeInfo member. Hexadecimal value of 0x20. |