Imports System.IO
Public Class Tester
Public Shared Sub Main
Dim f As System.IO.FileStream
Dim mylength As Integer
Dim i As Integer
Dim mybuffer(100) As Byte
f = New System.IO.FileStream("test.txt", IO.FileMode.Open, IO.FileAccess.Read)
f.Read(mybuffer, 0, 100)
For i = 0 To 99
Console.WriteLine(Chr(mybuffer(i)))
Next
f.Close()
End Sub
End Class
|