Hi all, I am trying to show / see the binary code of a file. So far I have this:This gives meVB Code:
Dim fStrm As FileStream Dim bytes(9) As Byte fStrm = New FileStream("c:\test.gif", FileMode.Open, FileAccess.Read) fStrm.Read(bytes, 0, bytes.Length) Dim i As Integer For i = 0 To bytes.Length - 1 RichTextBox2.Text += bytes(i).ToString & vbCrLf Next
71
73
70
56
55
97
253
0
77
0
which I suppose are bytes. What is the logic interpreting the bytes as a range 0 through 255? How to make them 000101010s etc?




Reply With Quote