I was wondering if anyone could tell me the raw code equivalent to the += operator for adding a method to an event. I am curious to how it it works from a technical standpoint.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
An
eventdefines a set of methods including “add” and “remove” (in the same way that a property defines “get” and “set”). to this is effectively:Internally, the event could do anything; there are 2 common cases:
EventHandlerListimplementationsWith a delegate, it effectively uses
Delegate.Combine:With an
EventHandlerListthere is a key object: