Expand Minimize

MemberTypes Enumeration

Marks each type of member that is defined as a derived class of MemberInfo.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

type MemberTypes

Member nameDescription
Supported by the XNA FrameworkAllSpecifies all member types.
Supported by the XNA FrameworkConstructorSpecifies that the member is a constructor, representing a ConstructorInfo member. Hexadecimal value of 0x01.
Supported by the XNA FrameworkCustomSpecifies that the member is a custom member type. Hexadecimal value of 0x40.
Supported by the XNA FrameworkEventSpecifies that the member is an event, representing an EventInfo member. Hexadecimal value of 0x02.
Supported by the XNA FrameworkFieldSpecifies that the member is a field, representing a FieldInfo member. Hexadecimal value of 0x04.
Supported by the XNA FrameworkMethodSpecifies that the member is a method, representing a MethodInfo member. Hexadecimal value of 0x08.
Supported by the XNA FrameworkNestedTypeSpecifies that the member is a nested type, extending MemberInfo.
Supported by the XNA FrameworkPropertySpecifies that the member is a property, representing a PropertyInfo member. Hexadecimal value of 0x10.
Supported by the XNA FrameworkTypeInfoSpecifies that the member is a type, representing a TypeInfo member. Hexadecimal value of 0x20.

These enum values are returned by 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.

The following example displays the member types for the specified class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft