Click or drag to resize
PropertyInfoGetSetMethod Method (Boolean)
When overridden in a derived class, returns the set accessor for this property.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public abstract MethodInfo GetSetMethod(
	bool nonPublic
)

Parameters

nonPublic
Type: SystemBoolean
Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false.

Return Value

Type: MethodInfo
Value Condition A MethodInfo object representing the Set method for this property. The set accessor is public.-or- nonPublic is true and the set accessor is non-public. nullnonPublic is true, but the property is read-only.-or- nonPublic is false and the set accessor is non-public.-or- There is no set accessor.
Exceptions
ExceptionCondition
SecurityExceptionThe requested method is non-public and the caller does not have ReflectionPermission to reflect on this non-public method.
See Also