How to use the BackgroundWorker event RunWorkerCompleted

后端 未结 3 2005
说谎
说谎 2021-01-18 05:30

All,I already knew the basic usage the BackgroundWorker to handle multiple thread case in the WinForm . And the code structure looks like below.

In the

3条回答
  •  情书的邮戳
    2021-01-18 06:03

    You can use the Result property to store any results from the DoWork and access it from Completed event. But if the background worker process got cancelled or an exception raised, the result won't be accessible. You will find more details here.

提交回复
热议问题