Can I reverse the order of a multicast delegate event?

Posted by Neil Barnwell on Stack Overflow See other posts from Stack Overflow or by Neil Barnwell
Published on 2010-06-09T22:05:00Z Indexed on 2010/06/09 22:12 UTC
Read the original article Hit count: 183

Filed under:
|

When you subscribe to an event in .NET, the subscription is added to a multicast delegate. When the event is fired, the delegates are called in the order they were subscribed.

I'd like to override the subscription somehow, so that the subscriptions are actually fired in the reverse order. Can this be done, and how?

I think something like this might be what I need?:

public event MyReversedEvent
{
    add { /* magic! */ }
    remove { /* magic! */ }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about events