in my VB.NET program I have to delete all bytes that come after these ones: 48534853
untill it's end (I know that this will corrupt the file).
How can I do that? I already wrote functions to replace a pattern with another one and to locate specific bytes, but I don't know how to wipe out everything after a pattern.
Use the
FileStream.SetLength
method.--
Try this:
Note that
fs.ReadByte()
returns the byte asInteger
.