suggest change

This example shows how PLINQ can be used to calculate the even numbers between 1 and 10,000 using multiple threads. Order will be maintained in the resulting list, however keep in mind that AsOrdered may hurt performance for a large numbers of elements, so un-ordered processing is preferred when possible.

var sequence = Enumerable.Range(1, 10000);
var evenNumbers = sequence.AsParallel()
                          .Where(x => x % 2 == 0)
// evenNumbers = { 2, 4, 6, 8, ..., 10000 }

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents