I've searched through a lot of examples for asynchronously updating UI controls in WinForms
, and most of the examples have tons of code. Is there a way to make this easier? I just feel like they're too much work at this time.
I've seen people do this:
await Task.Run(() =>
{
doSomething();
});
But I've heard that's bad and doesn't work right, and I don't like peppering my UI code with a multiple instances of await Task.Run(()=> {});
. And I've seen tons of examples on background workers.
Is there a better way to do this that won't require too much boilerplate code?