For ( int start, int stop, ForLoopBody loopBody ) : void |
Executes a for-loop in which iterations may run in parallel. The method is used to parallel for-loop running its iterations in different threads. The start and stop parameters define loop's starting and ending loop's indexes. The number of iterations is equal to stop - start. Sample usage: Parallel.For( 0, 20, delegate( int i ) // which is equivalent to // for ( int i = 0; i < 20; i++ ) { System.Diagnostics.Debug.WriteLine( "Iteration: " + i ); // ... } ); |
|