共用方式為


PropertyBuilder.GetAccessors Method (Boolean)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns an array of the public and non-public get and set accessors on this property. This method is not supported.

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

Syntax

'Declaration
Public Overrides Function GetAccessors ( _
    nonPublic As Boolean _
) As MethodInfo()
public override MethodInfo[] GetAccessors(
    bool nonPublic
)

Parameters

  • nonPublic
    Type: System.Boolean
    true to return non-public methods in the array; otherwise, false.

Return Value

Type: array<System.Reflection.MethodInfo[]
An array that contains the matching get and set accessors, or an empty array if matching accessors do not exist on this property.

Exceptions

Exception Condition
NotSupportedException

This method is not supported.

Remarks

To get the accessors of a property of a dynamic type before the type is completed, use the GetGetMethod and GetSetMethod methods.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.