Hex editing a file?

May 28 2009 3:04 AM
Hello,

I am quite new to C# and so far I only used text files to do stuff with, but now I have a file which I normally open with a hex editor and search for a value to change.
how can I do this in C#?

I am writing a program which should make it easier to change the values in this file.
I was wondering if someone here could help me.

How can I open a file and search for a hex value (like 00120035) and than change this value and save back the file.
One problem is that the value can be on a different spot every time.

I hope that is enough info. I can explain more but I thought that might confuse people to much.

I hope someone can help me!

Regards,
AlexUhde