EventInfo.GetRemoveMethod Method

Definition

Returns the method used to remove an event handler delegate from the event source.

Overloads

GetRemoveMethod(Boolean)

When overridden in a derived class, retrieves the MethodInfo object for removing a method of the event, specifying whether to return non-public methods.

GetRemoveMethod()

Returns the method used to remove an event handler delegate from the event source.

GetRemoveMethod(Boolean)

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

When overridden in a derived class, retrieves the MethodInfo object for removing a method of the event, specifying whether to return non-public methods.

C#
public abstract System.Reflection.MethodInfo? GetRemoveMethod(bool nonPublic);
C#
public abstract System.Reflection.MethodInfo GetRemoveMethod(bool nonPublic);

Parameters

nonPublic
Boolean

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

Returns

A MethodInfo object representing the method used to remove an event handler delegate from the event source.

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.

Examples

Typically, the method has the following signature:

remove_<EventName>(<EventHandlerType> handler)

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.5, 1.6, 2.0, 2.1

GetRemoveMethod()

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

Returns the method used to remove an event handler delegate from the event source.

C#
public System.Reflection.MethodInfo? GetRemoveMethod();
C#
public System.Reflection.MethodInfo GetRemoveMethod();

Returns

A MethodInfo object representing the method used to remove an event handler delegate from the event source.

Implements

Examples

Typically, the method has the following signature:

remove_<EventName>(<EventHandlerType> handler)

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.5, 1.6, 2.0, 2.1