03-14-2024, 05:10 AM
DoScreenshot, being async, returns when started await. The caller does not await it, therefore the process exits.
Simplified example. Incorrect.
Correct.
Simplified example. Incorrect.
static async void DoScreenshot(string url) {
await Task.Run(() => { dialog.show("task"); });
}
DoScreenshot("https://www.libreautomate.com/");
Correct.