BackgroundWorker.RunWorkerAsync Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Starts running a background operation.
Assembly: System (in System.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | IsBusy is true. |
The RunWorkerAsync method submits a request to start the operation running asynchronously. When the request is processed, the DoWork event is raised, which in turn starts running your background operation.
If the background operation is already running, calling RunWorkerAsync again will raise an InvalidOperationException.
The following code example demonstrates the use of the RunWorkerAsync method to start a background operation. To view the complete code for this sample, see How to use a background worker for Windows Phone 8.