public override void RemoveEventHandler(object target, Delegate handler)
{
if (Marshal.IsComObject(target))
{
Guid guid;
int num;
GetDataForComInvocation(this._innerEventInfo, out guid, out num);
new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
ComEventsHelper.Remove(target, guid, num, handler);
}
else
{
this._innerEventInfo.RemoveEventHandler(target, handler);
}
}