title: Passing an array name to a sub in VB.net
body: <p>I need your help for a problem I can't find any solution browsing the web.
  I have few subs in a program, all of them are generating their own arrays.
  Something like:</p>
  
  <pre><code>Private Sub SubName1()
     Array1(0,0) = 1
     Array1(0,1) = 2
  End Sub
  
  Private Sub SubName2()
     Array2(0,0) = 3
     Array2(0,1) = 4
  End Sub
  
  ...
  </code></pre>
  
  <p>What I need to do next is to call another Sub passing the name of one of the pre-defined arrays. 
  Something like:</p>
  
  <pre><code>...
  If this = that then
      FinalSub(Array1)
  Else
      FinalSub(Array2)
  End if
  ...
  
  Private Sub FinalSub(CalledArray() as string)
      DoSomethingWith(CalledArray(0,1)
  End Sub
  </code></pre>
  
  <p>I cannot find how to do this... Any idea on how I can achieve this? (I hope I'm clear in my question) :)</p>
  
  <p>Thanks a lot.
  Vince.</p>