I have some fixed hex values to be updated to a binary file. I read the binary file using a hex editor and i found that it needs an updation programattically.
using (var stream = new FileStream(AsciifileName, FileMode.Open, FileAccess.ReadWrite))
{
stream.Position = i;
stream.WriteByte(arrayval);
}
I tried using this but i couldnot manage the write as it is showing mis alignment.
I have a list with hexa values like
27 58 30 34 30 31 32 02
i want it to update at 2nd position as :
27 66 30 34 30 31 32 02
Is there somebody who is familiarized with this issue?.
**Steps needed **
- Convert an Binary to Ascii
- Update the Ascii file with my ascii values
- Convert back to binary