Export (0) Print
Expand All

PropertyBuilder.GetGetMethod Method (Boolean)

Returns the public or non-public get accessor for this property.

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

public override MethodInfo GetGetMethod(
	bool nonPublic
)

Parameters

nonPublic
Type: System.Boolean
true to return a non-public accessor; otherwise, false.

Return Value

Type: System.Reflection.MethodInfo
The get accessor for this property, if nonPublic is true. Returns null if nonPublic is false and the get accessor is non-public, or if nonPublic is true but no get accessor exists.

This method can be used on an incomplete PropertyBuilder object. A property might lack a get accessor because it is write-only, or because the get accessor has not been assigned yet. To assign a get accessor to a property, use the SetGetMethod method.

Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show:
© 2014 Microsoft