Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RemoveEventHandler() [2/2]

virtual void System.Reflection.EventInfo.RemoveEventHandler ( object? target,
Delegate? handler )
inlinevirtualinherited

Definition at line 94 of file EventInfo.cs.

95 {
96 MethodInfo removeMethod = GetRemoveMethod(nonPublic: false);
97 if (removeMethod == null)
98 {
99 throw new InvalidOperationException(SR.InvalidOperation_NoPublicRemoveMethod);
100 }
101 removeMethod.Invoke(target, new object[1] { handler });
102 }
MethodInfo? GetRemoveMethod()
Definition EventInfo.cs:64

References System.Reflection.EventInfo.GetRemoveMethod(), System.SR.InvalidOperation_NoPublicRemoveMethod, and System.Reflection.MethodBase.Invoke().

Referenced by System.Runtime.InteropServices.ComAwareEventInfo.RemoveEventHandler().