Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2. Dim tiedosto As IO.StreamReader
  3. Dim nimi As String
  4. 'luodaan tiedosto-olio
  5. tiedosto = New IO.StreamReader("C:\temp\testi.txt")
  6. 'luetaan tiedostoa rivi kerrallaan kunnes tiedosto on loppu
  7. Do Until tiedosto.Peek() = -1
  8. nimi = tiedosto.ReadLine()
  9. MessageBox.Show(nimi)
  10. Loop
  11. 'suljetaan tiedosto
  12. tiedosto.Close()
Add Comment
Please, Sign In to add comment