Use
BinaryReader[
^], it has the
BinaryReader.ReadInt16[
^] method.
Use a FileStream and since you don't care about the first 32768 bytes set Position to 32768 before passing it to the BinaryReader constructor.
The performance should be excellent ...
Whatever you are doing here is fairly expensive since you are repeatedly converting r,b,c to text
Trace.WriteLine("brc" & "," & b & "," & r & "," & c & "'" & iter)
XPositionOut.Clear()
XPositionOut.AppendText(c)
YPositionOut.Clear()
YPositionOut.AppendText(r)
BandPositionOut.Clear()
BandPositionOut.AppendText(b)
CellValueOut.AppendText(Convert.ToString(array3D(c, r, b)))
just declare three integers r, b and c - there seems to be no reason in your vb code for all the other stuff since the final destination for the data seems to be CellValueOut, and friends, inside the inner loop.
>> with more than a weeks worth of help from Microsoft technical support
I sincerely hope you don't have to pay for this
Regards
Espen Harlinn