Skip to content

Instantly share code, notes, and snippets.

/*
To address trouble with...
myList.ForEach( async x => ...do async work... )
where control returns before async operations are complete,
consider...
*/
namespace Example
{
public static async Task ForEachAsync<T>( this IEnumerable<T> list, Func<T, Task> func )