Edit

EventInfo.GetRaiseMethod Method

Definition

Returns the method that is called when the event is raised.

Overloads

Name Description
GetRaiseMethod(Boolean)

When overridden in a derived class, returns the method that is called when the event is raised, specifying whether to return non-public methods.

GetRaiseMethod()

Returns the method that is called when the event is raised.

GetRaiseMethod(Boolean)

Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs

When overridden in a derived class, returns the method that is called when the event is raised, specifying whether to return non-public methods.

public:
 abstract System::Reflection::MethodInfo ^ GetRaiseMethod(bool nonPublic);
public abstract System.Reflection.MethodInfo? GetRaiseMethod(bool nonPublic);
public abstract System.Reflection.MethodInfo GetRaiseMethod(bool nonPublic);
abstract member GetRaiseMethod : bool -> System.Reflection.MethodInfo
Public MustOverride Function GetRaiseMethod (nonPublic As Boolean) As MethodInfo

Parameters

nonPublic
Boolean

true if non-public methods can be returned; otherwise, false.

Returns

A MethodInfo object that was called when the event was raised.

Exceptions

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

Remarks

This method usually returns null for events declared with the C# event keyword or the Visual Basic Event keyword. This is because the C# and Visual Basic compilers do not generate such a method by default.

See also

Applies to

GetRaiseMethod()

Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs

Returns the method that is called when the event is raised.

public:
 System::Reflection::MethodInfo ^ GetRaiseMethod();
public System.Reflection.MethodInfo? GetRaiseMethod();
public System.Reflection.MethodInfo GetRaiseMethod();
member this.GetRaiseMethod : unit -> System.Reflection.MethodInfo
Public Function GetRaiseMethod () As MethodInfo

Returns

The method that is called when the event is raised.

Remarks

This method usually returns null for events declared with the C# event keyword or the Visual Basic Event keyword. This is because the C# and Visual Basic compilers do not generate such a method by default.

See also

Applies to