Last post Sep 30, 2014 09:52 AM by Mikesdotnetting
Sep 30, 2014 01:13 AM|_Doug|LINK
I have a byte array of data. How can I find and replacement a part of the byte array with replacement data?
dim foo as byte foo = MY DATA
If foo was a string, then I would do: foo = replace( foo, target, replacement )
But foo is a byte array. How can I replace?
Sep 30, 2014 02:37 AM|Mikesdotnetting|LINK
You can just loop through the elements of the array and reset the values of the ones you want to change:
For i = 0 To foo.Length - 1
If foo(i) = some_value_you_want_to_change Then foo(i) = replacement_value
Sep 30, 2014 09:03 AM|_Doug|LINK
This cannot work. There's a different # of replacement bytes.
Sep 30, 2014 09:52 AM|Mikesdotnetting|LINK
This cannot work
Yes it can. But not for your current requirement, whatever that is.