score:2

Accepted answer

it is working if you force the cast of the dynamic to double instead of letting the .todouble method find the appropriate type itself. instead, do an explicit cast:

for(var i = 0; i < result.count; i++)
    cumulativeavg.add(result.take(i + 1).average(r => (double)r.mydouble));

Related Query

More Query from same tag