c# return task list code example
Example: c# return task list
private async Task> GetListAsync(){
//Create a list object and assign it to a new task
//which returns your list object
List- list = await Task.Run(() => manager.GetList());
return list;
//Or you may just need to await something and just return a list
await SomeMethod();
List
- list1 = new List
- ();
return list;
}