我试图从二进制文件中读取地址0x3F040中的6个字节。这是我的代码:
using (BinaryReader b = new BinaryReader(File.Open(ofd.FileName,
FileMode.Open)))
{
int length = (int)b.BaseStream.Length;
int pos = 0x3F040;
int required = 6;
int count = 0;
b.BaseStream.Seek(pos, SeekOrigin.Begin);
while (pos < length && count < required)
{
byte y = b.ReadByte();
pos++;
count++;
metroTextBox6.Text = metroTextBox6.Text + y;
}
}
但是这会输出与HxD告诉我的不同的字节。我在这里做错了什么?