I have a third-party library which all methods are async and I have some questions
1) What is the difference between these two code lines?
Task.Run(async () => await MethodAsync());
Task.Run(() => PrepareDashBoard());
2) When I need to call an async method from an button click event which one is right?
// A.
private void Button_Click(object sender, EventArgs e)
{
//A Task Run call from questions 1) a or b with call to Wait or Result (if return something)
}
// B
private async void Button_Click(object sender, EventArgs e)
{
await MethodAsync();
}