Ambiguity with Action and Func parameter

前端 未结 3 1327
旧时难觅i
旧时难觅i 2021-02-12 19:10

How is it possible that this code

TaskManager.RunSynchronously(fileMananager.BackupItems, package);

causes a compile error

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-12 20:02

    I came across the same problem, the solution was:

    var r = RunSynchronously(x =>
    {
        return true;
    }, true);
    
    RunSynchronously(x =>
    {
    }, true);
    

    Now, why the compiler cannot do that???

提交回复
热议问题