Well, I've made simple code for reading binary hex file.
opfn.Title = "Select a Hex file";
opfn.DefaultExt = "*.hex";
opfn.Filter = "HEX Files|*.hex";
if (opfn.ShowDialog() == DialogResult.Cancel)
return;
string strPath = System.IO.Path.GetFullPath(opfn.FileName);
BinaryReader binReader = new BinaryReader(File.Open(strPath, FileMode.Open));
long lfileLength = binReader.BaseStream.Length;
Byte[] btFile = new Byte[lfileLength];
for (long lIdx = 0; lIdx < lfileLength; lIdx++)
{
btFile[lIdx] = binReader.ReadByte();
}
I hope this will great help you.