📅  最后修改于: 2022-03-11 14:48:56.010000             🧑  作者: Mango
//How to Apply async & await in C#
private async Task> GetBigListAsync()
{
var myTask = Task.Run( () => GetBigList());
// your thread is free to do other useful stuff right nw
DoOtherUsefulStuff();
// after a while you need the result, await for myTask:
List result = await myTask;
// you can now use the results of loading:
ProcessResult(result);
return result;
}