-
Notifications
You must be signed in to change notification settings - Fork 783
Closed
Labels
Description
I feel like I'm missing something obvious here but couldn't find an explanation anywhere, and MS documentation on this is rather brief...
await Enumerable.Range(1, 10)
.ToAsyncEnumerable()
.SelectAwait(async i => await Task.FromResult(i))
.FirstAsync()
returns int, but SelectAwait is now obsolete with explanation "Use Select", however
await Enumerable.Range(1, 10)
.ToAsyncEnumerable()
.Select(async i => await Task.FromResult(i))
.FirstAsync()
returns Task<int>, so Select is not a direct replacement as it'd need to be wrapped in something like await Task.WhenAll(...ToArrayAsync()) to get the same result. What am I missing?