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

傳回

用來從事件來源移除事件處理常式委派的方法。

例外狀況

nonPublictrue,而且用來將事件處理常式委派加入的方法是非公用的,但是呼叫端沒有使用權限來反映非公用的方法。

適用於

另請參閱