title: File I/O functionality is normally available in the 'Microsoft.VisualBasic' namespace, but the targeted platform does not support it
body: <p>I would like to open my .txt file, but i get this error</p>
  
  <p>Error   1   'Open' is not declared. File I/O functionality is normally available in the 'Microsoft.VisualBasic' namespace, but the targeted platform does not support it.   </p>
  
  <p>I'm using vb2010 and I think the code is wrong cuz it's for vb6. How to change it to work in vb2010?</p>
  
  <pre><code>Private Sub zapisz_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zapisz.Click
      Open "C:\Plik.txt" For Append As #1 'zapis
      print #1, "a" &amp; a.Text 
      Print #1, "b" &amp; b.Text
      Print #1, "c" &amp; c.Text
      Print #1, "d" &amp; d.Text
  Close #1 
  End Sub
  
  
  Private Sub wczytaj_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wczytaj.Click
      Dim strText As String, strIndex As String
  Open "C:\Plik.txt" For Input As #1
      Do Until EOF(1)
          Input #1, strText
          strIndex = Left(strText, 1)
          strText = Right(strText, Len(strText) - 1)
          Select Case strIndex
              Case "a" : a = strText
              Case "b" : b = strText
              Case "c" : c = strText
              Case "d" : d = strText
          End Select
      Loop
  Close #1
  End Sub
  </code></pre>