My code below reads a file offset and writes the hexadecimal values to the "MyGlobals.Hexbytes" variable .... How could I get it to write into an array instead?
Many Thanks
MyGlobals.Mapsettings_filepath = "C:\\123.cfg";
///////////////////////////// Read in the selected //////////////
BinaryReader br = new BinaryReader(File.OpenRead(MyGlobals.Mapsettings_filepath),
System.Text.Encoding.BigEndianUnicode);
for (int a = 32; a <= 36; a++)
{
br.BaseStream.Position = a;
MyGlobals.Hexbytes += br.ReadByte().ToString("X2") + ",";
}
MyGlobals.Hexbytes? And what type of array do you want? A byte array, a string array, etc? Please edit your question to add this information.