title: Reading (with Filesystem.FileGet) VB6 record file (written with Put) with C#
body: <p>I need to read data from a legacy database file produced by Visual Basic 6.
  From the legacy software I found that file was written using <code>Put</code> and passing sort of records as parameters to the <code>Put</code> function. These structures are defined as follows:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Type THE_TYPE
      FIELD_1 As Single
      FIELD_2 As String * 20
      FIELD_3(1 To 50) As Single
      FIELD_4(1 To 10) As String * 1
  End Type
  </code></pre>
  
  <p>My Types are larger and more complex but I've put in <code>THE_TYPE</code> the different definitions I have in my project. I've found that importing <code>Microsoft.VisualBasic</code> gives me access to VB functions similar to those used to write the file, so I'm opening and closing the file with <code>FileSystem.OpenFile()</code> and <code>.CloseFile();</code> now I need to finally read data contained and since the original function was:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Public RecordContent As THE_TYPE
  [...] 
  Get #1, recordNumber, RecordContent 
  </code></pre>
  
  <p>I suppose I can use something similar, like <code>Microsoft.VisualBasic.FileSystem.FileGet()</code>.<br>
  So the question is, how do I define a container, I suppose a class, similar to the original VB6 Type <code>THE_TYPE</code>? How do I call <code>.FileGet()</code> to correctly fill this object?</p>