System.Reflection.Emit.PropertyBuilder.GetAccessors Method

Returns an array of the public and non-public get and set accessors on this property.

Syntax

public override System.Reflection.MethodInfo[] GetAccessors (bool nonPublic)

Parameters

nonPublic
Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false.

Returns

An array of type MethodInfo containing the matching public or non-public accessors, or an empty array if matching accessors do not exist on this property.

Remarks

To get the accessors of a property, reflect on the property's parent type using Type.GetType or Assembly.GetType, retrieve the Reflection property object from the type, and call PropertyInfo.GetAccessors.

Requirements

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