Export (0) Print
Expand All

PropertyBuilder.GetSetMethod Method (Boolean)

Returns the set accessor for this property.

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

public override MethodInfo GetSetMethod(
	bool nonPublic
)

Parameters

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

Return Value

Type: System.Reflection.MethodInfo

Value

Condition

The set accessor for this property.

The set accessor is public.

-or-

nonPublic is true and a set accessor has been assigned to the property.

null

nonPublic is false and the set accessor is non-public.

-or-

There is no set accessor because the property is read-only.

This method can be used on an incomplete PropertyBuilder object. A property might lack a set accessor because it is read-only, or because the set accessor has not been assigned yet. To assign a set accessor to a property, use the SetSetMethod 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