How to yield return inside anonymous methods?

后端 未结 7 531
南笙
南笙 2021-01-07 16:43

Basically I have an anonymous method that I use for my BackgroundWorker:

worker.DoWork += ( sender, e ) =>
{
    foreach ( var effect in Glob         


        
7条回答
  •  轮回少年
    2021-01-07 16:58

    DoWork is of type DoWorkEventHandler which returns nothing (void), so it's not possible at all in your case.

提交回复
热议问题