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

System.Reflection.EventInfo.GetRaiseMethod Method

Returns the method that is called when the event reflected by the current instance is raised, specifying whether the method to be returned is public or non-public.

public abstract MethodInfo GetRaiseMethod (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 that is called when the event reflected by the current instance is raised, 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 raise the event is non-public, and the caller does not have permission to reflect on non-public methods.

Remarks

Operation
As described above.

Requirements

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