PropertyInfoGetSetMethod Method (Boolean) |
When overridden in a derived class, returns the set accessor for this property.
Namespace: System.ReflectionAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax 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:
MethodInfoValue 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. null
nonPublic 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 Exception | Condition |
---|
SecurityException | The requested method is non-public and the caller does not have ReflectionPermission to reflect on this non-public method. |
See Also