How to implement a cancel event in C#

后端 未结 5 1470
星月不相逢
星月不相逢 2021-02-12 12:28

I know that in C#, there are several built in events that pass a parameter (\"Cancel\") which if set to true will stop further execution in the object that raised the eve

5条回答
  •  感动是毒
    2021-02-12 12:53

    You have to wait the call that raise the event and then check the flag in your EventArgs (in particular CancelEventArgs).

提交回复
热议问题