Mono Class Library: System.Reflection.EventInfo Overview | Members

System.Reflection.EventInfo.GetRemoveMethod Method

Returns the method used to remove an event-handler delegate from the event reflected by the current instance, specifying whether or not to return non-public methods.

public abstract MethodInfo GetRemoveMethod (bool nonPublic)

Parameters

nonPublic
A bool value that specifies whether non-public methods can be returned by this method. Specify true to return non-public methods; otherwise, specify false .

Returns

A System.Reflection.MethodInfo instance that reflects the method used to remove an event handler delegate from the event reflected by the current instance, if found; otherwise, returns null .

Permissions

TypeReason
System.Security.Permissions.ReflectionPermissionRequires permission to reflect non-public members of a type in loaded assemblies. See System.Security.Permissions.ReflectionPermissionFlag.TypeInformation.

Exceptions

TypeReason
MethodAccessExceptionnonPublic is true, the method used to remove an event handler delegate is non-public, and the caller does not have permission to reflect on non-public methods.

Remarks

Note:

Typically, the method has the following signature format:

remove_<EventName>(<EventHandlerType> handler)

Operation
As described above.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0