title: Loading Comma Delimited Text file into a Dictionary
body: <p>I want to add the contents of a comma delimited text file(PracInfo.txt) into a Dictionary on Form_Load. The contents of the file are as follows:</p>
  
  <pre><code>wlvc,coadmin
  mrmd,thadmin
  ccoa,oaadmin
  bfhl,bfadmin
  trty,tradmin
  nppp,npadmin
  </code></pre>
  
  <p>For example, I want the wlvc to be the key and the coadmin to be the corresponding value. The code I have so far goes as follows:</p>
  
  <pre><code>Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
          Dim sr As New StreamReader("C:\Programming files\PracInfo.txt")
          Dim openWith As New Dictionary(Of String, String)
  
          Do While sr.Peek &lt;&gt; -1
            strHold = sr.ReadLine()
  
            ' here I would like to use the String.Split method on strHold and then put that into the Dictionary using Dictionary.Add(Key,Value) but not sure how to do this????
  
          Loop    
      End Sub
  End Class
  </code></pre>
  
  <p>Any help in this matter would be greatly appreciated! Thanks</p>