title: Converting Quick BASIC to VB.Net - Random Access Files
body: <p>I'm trying to convert an old Quick BASIC program to VB.Net. There doesn't appear to be any direct replacement for the old file statements. Building a database seems like overkill for my simple needs.</p>
  
  <p>How can I do the following in VB.Net?</p>
  
  <pre><code>OPEN "test.dat" FOR RANDOM AS #1 LEN = 20
  FIELD #1, 10 AS a$, 10 AS b$
  LSET a$ = "One"
  LSET b$ = "Two"
  PUT #1, 1
  GET #1, 1
  PRINT a$, b$
  CLOSE #1
  </code></pre>