Edit

Share via


EventInfo.GetRaiseMethod Method

Definition

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

Overloads

GetRaiseMethod()

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

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()

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:
 virtual System::Reflection::MethodInfo ^ GetRaiseMethod();
public System.Reflection.MethodInfo? GetRaiseMethod ();
public System.Reflection.MethodInfo GetRaiseMethod ();
member this.GetRaiseMethod : unit -> System.Reflection.MethodInfo
abstract member GetRaiseMethod : unit -> System.Reflection.MethodInfo
override this.GetRaiseMethod : unit -> System.Reflection.MethodInfo
Public Function GetRaiseMethod () As MethodInfo

Returns

The method that is called when the event is raised.

Implements

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(Boolean)

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.

Implements

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