While using Parallel.ForEach we have the option to define the Parallel options and set the Max Degree of Parallelism like :
Parallel.ForEach(values, new ParallelOptions {MaxDegreeOfParallelism = number}, value = > { // Do Work }) But while doing PLINQ like:
Tabel.AsEnumberable() .AsParallel() .Where(//Logic) I was not able to find a way to set MaxDegreeOfParallelism. I looked up on the net as well, but didn't find anything. As anyone found a way around this? Any help is appreciated.