Edit

Share via


_PropertyInfo.GetAccessors Method

Definition

Provides COM objects with version-independent access to the GetAccessors methods.

Overloads

GetAccessors()

Provides COM objects with version-independent access to the GetAccessors() method.

GetAccessors(Boolean)

Provides COM objects with version-independent access to the GetAccessors(Boolean) method.

Remarks

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The GetAccessors methods return an array of the get and set accessors on this property.

GetAccessors()

Provides COM objects with version-independent access to the GetAccessors() method.

public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetAccessors();
public System.Reflection.MethodInfo[] GetAccessors ();
abstract member GetAccessors : unit -> System.Reflection.MethodInfo[]
Public Function GetAccessors () As MethodInfo()

Returns

An array of MethodInfo objects that reflect the public get, set, and other accessors of the property reflected by the current instance, if accessors are found; otherwise, this method returns an array with zero (0) elements.

Remarks

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The GetAccessors method returns an array whose elements reflect the public get, set, and other accessors of the property reflected by the current instance.

Applies to

GetAccessors(Boolean)

Provides COM objects with version-independent access to the GetAccessors(Boolean) method.

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

Parameters

nonPublic
Boolean

true to include non-public methods in the returned MethodInfo array; otherwise, false.

Returns

An array of MethodInfo objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If the nonPublic parameter is true, this array contains public and non-public get, set, and other accessors. If nonPublic is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements.

Remarks

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The GetAccessors method returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance.

Applies to