Try something like this:
VB Code:
Dim fs As IO.FileStream = New IO.FileStream(filename, IO.FileMode.Open)'open file Dim br As New IO.BinaryReader(fs)'read as binary Dim b() As Byte = br.ReadBytes(fs.Length)'now the contents are in a byte array Dim str As String = System.Text.Encoding.ASCII.GetString(b)'convert byte array to string br.Close()'close file fs.Close()




Reply With Quote