You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

|
|
Source code |
1 |
Dim sr As StreamReader = New StreamReader("lvl1.txt")
|
|
|
Source code |
1 |
Dim sr As StreamReader = New StreamReader("lvlX.txt")
|


|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Try
' Create an instance of StreamReader to read from a file.
Dim sr As StreamReader = New StreamReader(filename)
Dim line As String
' Read and display the lines from the file until the end
' of the file is reached.
Do
line = sr.ReadLine()
Console.WriteLine(line)
MessageBox.Show(line)
Loop Until line Is Nothing
sr.Close()
Catch E As Exception
' Let the user know what went wrong.
Console.WriteLine("The file could not be read:")
Console.WriteLine(E.Message)
End Try
|

-