PropertyBuilder::GetAccessors Method (Boolean)

 

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

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

public:
virtual array<MethodInfo^>^ GetAccessors(
	bool nonPublic
) override

Parameters

nonPublic
Type: System::Boolean

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

Return Value

Type: array<System.Reflection::MethodInfo^>^

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.

Exception Condition
NotSupportedException

This method is not supported.

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.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: