ComAwareEventInfo.GetRemoveMethod(Boolean) 方法

定义

在派生类中重写时,检索用于移除该事件的方法的 MethodInfo 对象。

public:
 override System::Reflection::MethodInfo ^ GetRemoveMethod(bool nonPublic);
public override System.Reflection.MethodInfo? GetRemoveMethod (bool nonPublic);
public override System.Reflection.MethodInfo GetRemoveMethod (bool nonPublic);
override this.GetRemoveMethod : bool -> System.Reflection.MethodInfo
Public Overrides Function GetRemoveMethod (nonPublic As Boolean) As MethodInfo

参数

nonPublic
Boolean

如果返回非公共方法,则为 true;否则为 false

返回

MethodInfo

用于从事件源中移除事件处理程序委托的方法。

例外

nonPublictrue,表示用于添加事件处理程序委托的方法为非公共的,并且调用方无权对非公共方法进行反射。

适用于

另请参阅