What is exactly the += ( s, e ) in the code?
example:
this.currentOperation.Completed += ( s, e ) => this.CurrentOperationChanged();
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.
This is the way to attach an event handler using Lambda expression.
For example:
Can be rewritten using lambda as follows:
One thing to note here. It is not necessary to write ‘s’ and ‘e’. You can use any two letters, e.g.
The first parameter would represent the object that fired the event and the second would hold data that can be used in the eventhandler.