Does anyone know if there’s any overload that would allow me to specify a step size in a Parallel.For loop? Samples in either C# or VB.Net would be great.
Does anyone know if there’s any overload that would allow me to specify a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Google for “enumerable.range step” and you should be able to come upon alternate implementations of Enumerable.Range that provide stepped ranges. Then you can just do a
If google isn’t working, implementation should be something like this:
Alternately if “yield return” gives one the heebie jeebies, you can always just create a regular old list in-place:
This should be easily translatable to VB if that’s a requirement.