title: Assign a value to the variable inside the array with VB.NET in WinForms
body: <p>I am doing windows application in vb.net. I want to assign a value to the variable at run time. </p>
  
  <p>For example.</p>
  
  <pre><code>Dim Mystring(2) As String
  Mystring(0) = "1"
  Mystring(1) = "2"
  Dim var1, var2 As String
  Mystring = {a = Mystring(0), b = Mystring(1)}
  MsgBox(var1)
  MsgBox(var2)
  </code></pre>
  
  <p>I want to store the <strong>Mystring(0)</strong> value in variable <strong>var1</strong> and <strong>Mystring(1)</strong> value in variable <strong>var2</strong>, but the above code message box returns null value. Thanks!</p>