There is a site that I parse in multi-thread The main problem is that I do not know in advance the number of pages. Therefore, I want to make a check through the while . How to combine these two designs? Or maybe there is an alternative?
Parallel.For(0, 10, new ParallelOptions { MaxDegreeOfParallelism = 4 }, count => { Console.WriteLine(count); });