title: How to read and write comma delimited text files in vb.net
body: <p>I am currently converting some old VB6 code to VB.net 2013 and am having difficulty reading and writing comma delimited text files. The old VB6 read/write code was straightforward using the Input statement and storing the comma delimited values in the following variables.</p>
  
  <pre><code>Open FileName For Input As #1
  
    Input #1, A, B, C, D
    Input #1, E, F, G, H
    Input #1, I, J, K, L
  
  Close #1
  </code></pre>
  
  <p>The user would then have the ability to save the file changes back to the comma delimited text file using the Write statement as follows:</p>
  
  <pre><code>Open FileName For Output As #1
  
     Write #1, A, B, C, D
     Write #1, E, F, G, H
     Write #1, I, J, K, L
  
  Close #1
  </code></pre>
  
  <p>This should be a fairly simple task in VB.NET but I am having trouble getting it right. Any help is appreciated.</p>