44. Task.Run(() => { /* Lots of work to do! */ });
Task<string>.Run(() =>
{
/* Lots of work to do! */
return "Hello World!";
});
46. Task.Run(() => { /* Lots of work to do! */ })
.ContinueWith((t) => { Debug.WriteLine("Done!"); });
await Task.Run(() => { /* Lots of work to do! */ });
Debug.WriteLine("Done!");
47. Task.Run(() => "Hello World!")
.ContinueWith((task) => Debug.WriteLine(task.Result));
var result = await Task.Run(() => "Hello World!");
Debug.WriteLine(result);
49. Task.Run(() => { /* Lots of work to do! */ })
.ContinueWith((t) => { Debug.WriteLine("Done!"); });
await Task.Run(() => { /* Lots of work to do! */ });
Debug.WriteLine("Done!");