BackgroundWorker RunWorkerCompletedEventArgs.Cancelled 始终为 false
我通过调用 BackgroundWorker 上的 CancelAsync()
方法来取消操作,当执行发生在 RunWorkerCompleted
事件中时,Cancelled
属性>RunWorkerCompletedEventArgs 为 false。
不过,我不太清楚应该在何时何地将其设置为 true
,如 EventArgs
属性中所示。那么,怎么样?
I cancel my operation by calling the CancelAsync()
method on the BackgroundWorker, and when execution falls into the event RunWorkerCompleted
, property Cancelled
on RunWorkerCompletedEventArgs
is false.
Though, I couldn't quite figure out when or where I should set it to true
, as found in the EventArgs
property. So, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 MSDN:
From MSDN: