Is there a way to handle exceptions thrown by a task without the task freezing the UI?

前端 未结 0 1423
自闭症患者
自闭症患者 2020-12-31 18:32
public async void CallTask()
{
    try
    {
        await Task.Run(MyTaskMethod);
    }
    catch (ArgumentException ex) // Exception doesn\'t get handled
    {
            


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题