BackgroundWorker.CancellationPending 属性

获取一个值,该值指示应用程序是否已请求取消后台操作。

命名空间:   System.ComponentModel
程序集:  System(位于 System.dll)

语法:

[BrowsableAttribute(false)]

public bool CancellationPending { get; }

public bool CancellationPending { get; }

属性值

Type: System.Boolean

true 如果应用程序已请求取消的后台操作;,否则为 false。 默认值为 false

 

备注

如果 CancellationPending 是 true, ,则 CancelAsync 对调用方法 BackgroundWorker

此属性都适用于由辅助线程,应定期检查 CancellationPending 并中止后台操作,当设置为 true

posted @ 2018-04-09 17:26  大圣爷  阅读(231)  评论(0编辑  收藏  举报