title: VB.NET 4.0 Parallel.ForEach AddressOf Multiple Values?
body: <p>I am trying change from Delegates to Parallel.ForEach</p>
  
  <p>I see the below works fine.</p>
  
  <pre><code>Imports System.Threading.Tasks
  
    Sub Main()
     Dim secs() As Integer = {2, 3, 1}
     Parallel.ForEach(secs, AddressOf Method2)
    End Sub
  
    Sub Method2(ByVal i As Integer)
     Console.WriteLine(i.ToString)
    End Sub
  </code></pre>
  
  <p>But what if my Sub takes more then one variable? Can you show me  how I should do the below?</p>
  
  <pre><code>Imports System.Threading.Tasks
    Sub Main()
     Dim secs() As Integer = {2, 3, 1}
     Dim Path as String = "Constant"
  
     Parallel.ForEach(secs, Path, AddressOf Method2)
    End Sub
  
   Sub Method2(ByVal i As Integer, path as string )
    Console.WriteLine(i.ToString, path)
   End Sub
  </code></pre>
  
  <p>Thank you</p>