BackgroundWorker.WorkerSupportsCancellation Propriété

Définition

Obtient ou définit une valeur qui indique si BackgroundWorker prend en charge l'annulation asynchrone.

public:
 property bool WorkerSupportsCancellation { bool get(); void set(bool value); };
public bool WorkerSupportsCancellation { get; set; }
member this.WorkerSupportsCancellation : bool with get, set
Public Property WorkerSupportsCancellation As Boolean

Valeur de propriété

Boolean

true si BackgroundWorker prend en charge l'annulation ; sinon, false. La valeur par défaut est false.

Remarques

Définissez la WorkerSupportsCancellation propriété true sur si vous souhaitez prendre en charge l’annulation BackgroundWorker . Lorsque cette propriété est true, vous pouvez appeler la CancelAsync méthode pour interrompre une opération en arrière-plan.

S’applique à

Voir aussi