title: For WinRT Metro Apps what is the equivalent to Parallel.ForEach
body: <p>This is example code from the MSDN page talking about Parallel.For.  I want to do the same thing in WinRT C#:</p>
  
  <pre><code>#region Sequential_Loop
  static void MultiplyMatricesSequential(double[,] matA, double[,] matB, double[,] result)
  {
      int matACols = matA.GetLength(1);
      int matBCols = matB.GetLength(1);
      int matARows = matA.GetLength(0);
  
      for (int i = 0; i &lt; matARows; i++)
      {
          for (int j = 0; j &lt; matBCols; j++)
          {
              for (int k = 0; k &lt; matACols; k++)
              {
                  result[i, j] += matA[i, k] * matB[k, j];
              }
          }
      }
  }
  #endregion
  
  #region Parallel_Loop
  
  static void MultiplyMatricesParallel(double[,] matA, double[,] matB, double[,] result)
  {
      int matACols = matA.GetLength(1);
      int matBCols = matB.GetLength(1);
      int matARows = matA.GetLength(0);
  
      // A basic matrix multiplication.
      // Parallelize the outer loop to partition the source array by rows.
      Parallel.For(0, matARows, i =&gt;
      {
          for (int j = 0; j &lt; matBCols; j++)
          {
              // Use a temporary to improve parallel performance.
              double temp = 0;
              for (int k = 0; k &lt; matACols; k++)
              {
                  temp += matA[i, k] * matB[k, j];
              }
              result[i, j] = temp;
          }
      }); // Parallel.For
  }
  
  #endregion
  </code></pre>
  
  <p>What is the equivalent int C# for WinRT Metro?  </p>
  
  <p>Should I create an Array of Tasks and Await the completion of the Array?</p>