StackOverflow 文档 C# Language 教程 并行 LINQ(PLINQ) WithDegreeOfParallelism WithDegreeOfParallelism Created: November-22, 2018 并行度是将用于处理查询的并发执行任务的最大数量。 var sequence = Enumerable.Range(1, 10000); var evenNumbers = sequence.AsParallel() .WithDegreeOfParallelism(4) .Where(x => x % 2 == 0); AsOrdered简单的例子