OK I searched and have yet to find a suitable solution. Most of what I've found used a BinaryReader and was WAY too slow.
I'm trying to do a simple byte replace on a large binary file and not getting the speed I want.
In VB, I was able to use the following, so I'm wondering if it can be modified for .NET:
Open File For Binary As #ff
FileString = String$(LOF(ff), Chr$(0))
Get #ff, 1, FileString
If FileString = "" Then Exit Function
ReDim FileStringArray(1 To Len(FileString)) As Byte
Call CopyMemory(FileStringArray(1), ByVal FileString, Len(FileString))
For temp = 1 To Len(FileString)
If FileStringArray(temp) = Asc(Chr(174)) Then 'replace through numeric Value
FileStringArray(temp) = 13
Call CopyMemory(ByVal FileString, FileStringArray(1), Len(FileString))
ff1 = FreeFile
Open tempfn$ For Binary As #ff1
Put #ff1, 1, FileString