shekarchee is close, but if you need to keep the results in the same sequence as if it was NOT performed in parallel, then the simplest is to use an array instead of the
List<double>
.
const int count = 10;
double[] results = new double[count];
Parallel.For(0, count, i => { results[i] = SumRootN(i, "t"); });