title: Finding HEX value at a specific offset in VB.net
body: <p>I'm trying to figure out how to read a section of bytes (Say 16) starting at a specific address, say 0x2050. I'd like to get the 16 bits output in hex values into a label.</p>
  
  <p>I've been trying to figure out BinaryReader, and FileStreams but I'm not entirely sure what the difference is, or which one I should be using.</p>
  
  <p>*I've seen a lot of threads mentioning file size could be an issue, and I'd like to point out that some files I'll be checking may be up to 4gb in size.</p>
  
  <hr>
  
  <p>I've tried the following:</p>
  
  <pre><code>Dim bytes() As Byte = New Byte(OpenedFile.Length) {}
  ListBox1.Items.Add(Conversion.Hex(OpenedFile.Read(bytes, &amp;H2050, 6)))
  </code></pre>
  
  <p>But this simply writes 6 bytes to the file, and I'm not sure why. There is no output in the listbox.</p>