Stream read operation : Stream « Stream File « VB.Net Tutorial






Imports System.IO


Public Class Tester
    Public Shared Sub Main
        Dim f As System.IO.File
        Dim r As System.IO.Stream
        Dim mylength As Integer
        Dim i As Integer
        Dim mybuffer(100) As Byte
        r = f.OpenRead("test.txt")
        mylength = r.Read(mybuffer, 0, 100)
        For i = 0 To mylength
            Console.WriteLine(Chr(mybuffer(i)))
        Next
        r.Close()

    End Sub

End Class








13.17.Stream
13.17.1.Stream read operation
13.17.2.Stream seek operation
13.17.3.Read from text file
13.17.4.Seek file position