What are the differences between this two methods that seems to do the same thing? Can it be done even with async/await?
public Task<int> TaskMaxAsync1 ( Task<int>[] my_ints )
{
return Task.WhenAll( my_ints )
.ContinueWith ( x => x.Result.Where ( i => i%2 != 0 ).Max( ) ) ;
}
public Task<int> TaskMaxAsync2 ( Task<int>[] my_ints )
{
var numbers = Task.WhenAll( my_ints ).Result ;
return Task.FromResult( numbers.Where( i => i%2 != 0 ).Max( ) ) ;
}