C# Background worker setting e.Result in DoWork and getting value back in WorkCompleted

后端 未结 3 1794
野的像风
野的像风 2020-12-18 19:52

C# 2008 SP1

I am using the background worker

If one of the conditions fails I will set e.cancel to true, and assign the string to the e.result. Everything wo

3条回答
  •  无人及你
    2020-12-18 20:28

    It's most probably because the code Cancels the work instead of completing it. So try accessing the result in the if(!e.Cancel) branch.

提交回复
热议问题