what is the meaning of “ += ( s, e )” in the code?

前端 未结 4 1063
无人及你
无人及你 2021-02-06 11:22

What is exactly the += ( s, e ) in the code?

example:

this.currentOperation.Completed += ( s, e ) => this.CurrentOperationChanged();

4条回答
  •  逝去的感伤
    2021-02-06 11:50

    This is an assignment of a delegate instance (the start of a lambda expression) to an event invocation list. The s, e represents the sender and EventArgs parameters of the event delegate type.

    See http://msdn.microsoft.com/en-us/library/ms366768.aspx for more info.

提交回复
热议问题