Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 712615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:52:05+00:00 2026-05-14T04:52:05+00:00

I have 3 objects. Object A has an event X that other objects can

  • 0

I have 3 objects.
Object A has an event X that other objects can subscribe to.
Object B registers for Object A’s X event.

How do I deregister Object B from Object A’s X event from within Object C?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:52:05+00:00Added an answer on May 14, 2026 at 4:52 am

    You don’t – the point of events is that it encapsulates the pub/sub part so that no-one else can mess.

    Now if you (object C) can act as a proxy for object B the whole time, that’s a different matter. If you expose your own event which object B subscribes to instead of it subscribing to object A – and if you subscribe to object A on behalf of object B, then there are various ways of unsubscribing from object A. But unless you’ve been involved in that process, what “right” have you to mess with another piece of code’s event handlers?

    EDIT: Just to pick up on your reflection point… if you have the appropriate permissions then you may be able to find a field which backs the event. At that point you can examine it directly – but that still doesn’t mean you know which handlers have been added by Object B. You could find handler methods that are within the type object B or a nested type, but those don’t have to have been added by object B – and object B could have attached handlers from other classes. Basically there’s nothing to say “who” subscribed to an event – only what the handler is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of objects, all from the same class(ColorNum) Each object has
I have a tree that consists of several objects, where each object has a
I have a Task object that has a collection of Label objects ... in
Suppose I have a design like this: Object GUI has two objects: object aManager
I have a list of objects. Each object has an integer quantity and a
I have a database populated with 1 million objects. Each object has a 'tags'
I have parsed XML file into objects, in which each object has a 1:1
I have a program that (amongst other things) has a command line interface that
I have object1 as a child of a Canvas. object1 has a MouseLeftButtonDown event
I have a .Net object (in C#) which has properties named event1, event2 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.