Partager via


BackgroundWorker.WorkerSupportsCancellation Propriété

Définition

Obtient ou définit une valeur indiquant si la prise en charge de l’annulation BackgroundWorker 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é

true si l’annulation BackgroundWorker prend en charge ; 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