แก้ไข

แชร์ผ่าน


PropertyBuilder.GetAccessors(Boolean) Method

Definition

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

public:
 override cli::array <System::Reflection::MethodInfo ^> ^ GetAccessors(bool nonPublic);
public override System.Reflection.MethodInfo[] GetAccessors (bool nonPublic);
override this.GetAccessors : bool -> System.Reflection.MethodInfo[]
Public Overrides Function GetAccessors (nonPublic As Boolean) As MethodInfo()

Parameters

nonPublic
Boolean

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.

Exceptions

This method is not supported.

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.

Applies to