System.Reflection.MemberTypes Enumeration

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

Syntax

[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
public enum MemberTypes

Remarks

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:

Members

Member NameDescription
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.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0