title: Reading a .dat file
body: <p>I have a file I am trying to read and disply results into a text box. The file has no extension, but it is a 'data' file per the website (www.checkfiletype.com).</p>
  
  <p>Here is a screen shot of how the file looks in a online reader, it looks like hex?
  <a href="https://i.stack.imgur.com/viqjA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/viqjA.png" alt="enter image description here"></a></p>
  
  <p>I have tried a stream reader, and gives nothing in results. Last method I tried was a BinaryReader, that I have never used before. The results from this is a "0" into the text box. Given that I have never used the BinaryReader function, I am sure I did something wrong with it. </p>
  
  <pre><code>Using reader As New BinaryReader(File.Open("C:\Users\jefhill\Desktop\CMOSDATA", FileMode.Open))
          Dim pos As Integer = 0
          Dim length As Integer = reader.BaseStream.Length
          While pos &lt; length
              ' Read the integer.
              Dim value As Integer = reader.ReadInt32()
              ' Write to screen.
              TextBox1.Text = value
              ' Add length of integer in bytes to position.
              pos += 4
          End While
      End Using
  </code></pre>
  
  <p>Any help would be greatly appreciated. </p>
  
  <p><strong>EDIT</strong>
  I tried using a basic StreamReader. With this, nothing happens, as in no errors, just puts nothing(blank) into the textbox.</p>
  
  <pre><code>Dim file As String = "C:\Users\jefhill\Desktop\CMOSDATA"
      Dim reader As New System.IO.StreamReader(file)
      TextBox1.Text = reader.ReadToEnd
      reader.Close()
  </code></pre>