title: Parallel.For VS For. Why there is this difference?
body: <p>I have an array (i), and I want to do some math calculations based on the i value with a <code>Parallel.For()</code>.</p>
  
  <p>But the problem is, after running the <code>Parallel.For()</code>, the values on my array are still 0.</p>
  
  <p>This happens when my for is from 0 to 0.</p>
  
  <p>This is my code :</p>
  
  <pre><code>    Dim a(10) As Double
      Parallel.For(0, 0, Sub(i)
                             a(i) = i + 2
                             'There is some calculations based on instead of previous line!
                             'But anyway, the result will be on a(i).
                         End Sub)
  
      MessageBox.Show(a(0)) 'This returns 0!
  
  
      For i As Integer = 0 To 0
          a(i) = i + 2
      Next
      MessageBox.Show(a(0)) 'But this returns 2!
  </code></pre>
  
  <p>What is the problem?</p>