Untitled

mail@pastecode.io avatar
unknown
csharp
2 years ago
193 B
4
Indexable
Never
var results = new List<X>();
foreach (var item in items)
{
    results.Add(await GetSomething(item));
}

return results;



var results = await Task.WhenAll(items.Select(i => GetSomething(i)));