Hex search and replace

Imperio Tuga 41 Reputation points
2021-10-13T09:55:09.197+00:00

Hello, im trying to do an bytes replacer in a .bin file.

I need to search this value in file
08 01 10 05 30 08 81 22

And replace it with
90 81 19 40 00 78 41 00

I've used fileContents = fileContents.Replace(Convert.ToChar(&H08) but seems my file gets weird.
Thanks

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,579 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Imperio Tuga 41 Reputation points
    2021-10-13T11:21:41.64+00:00

    Thanks Castorix31

    0 comments No comments