title: Porting a .bas file to vb.net
body: <p>I'm working on some legacy VB5/VB6 code and need to convert a ".bas" file to vb.net. </p>
  
  <p>I found several options</p>
  
  <ol>
  <li><p>Compile the .bas file into a com dll and then reference and use it in my project. (For this I guess I would need vb5 or vb6 which I don't have at my disposal)</p></li>
  <li><p>Copy and paste the contents of the file in to a new module in vb.net and then try solving the errors one by one.</p></li>
  </ol>
  
  <p>The contents of the .bas file reference a particular dll.
  The .bas file has mostly declarations consts, types, sub's and functions.</p>
  
  <p>What would be the most elegant way of redoing this in vb.net. Is it as simple as option 2.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I used VS2008 express and ran the code through the upgrade wizard it did the necessary conversion. and the .bas file was converted to .vb. I took that file and decided to rewrite other parts of the code, including some redoing of the converted .vb file.</p>
  
  <p>Other questions related to this one are <a href="https://stackoverflow.com/questions/5072831/vb-net-passing-a-structure-to-unmanaged-dll">here</a>.</p>