A Use the following code:
Dim fs As New FileStream("C:\file.txt", FileMode.Open)
Dim bs As New BufferedStream(fs)
Dim bytes As Byte() = New Byte(1022) {}
bs.Read(bytes, 0, bytes.Length)
bs.Close()
For i As Integer = 0 To bytes.Length - 2
Console.WriteLine("{0} : {1}", I, bytes(i__1))
Next
B Use the following code:
Dim fs As New FileStream("C:\file.txt", FileMode.Open)
Dim bytes As Byte() = New Byte(1022) {}
fs.Read(bytes, 0, bytes.Length)
fs.Close()
For i As Integer = 0 To bytes.Length - 2
Console.WriteLine("{0} : {1}", I, bytes(i__1))
Next
C Use the following code:
Dim fs As New FileStream("C:\file.txt", FileMode.Open)
Dim bs As New BufferedStream(fs)
Dim bytes As Byte() = New Byte(1022) {}
bytes = bs.ReadAllBytes(0, 1023)
bs.Close()
For i As Integer = 0 To bytes.Length - 2
Console.WriteLine("{0} : {1}", I, bytes(i__1))
Next
D Use the following code:
Dim fs As New FileStream("C:\file.txt", FileMode.Open)
Dim bs As New BufferedStream(fs)
Dim bytes As Byte() = New Byte(1022) {}
bs.Read(bytes)
bs.Close()
For i As Integer = 0 To bytes.Length - 2
Console.WriteLine("{0} : {1}", I, bytes(i__1))
Next