0
我已經在Visual Basic 6中編寫了一些反轉文件內容的代碼,但是由於VB.NET只讀取文件的文本部分,因此我將該代碼轉換爲.NET時出現問題。有人可以告訴我這個代碼的VB.NET等價物。我相信這不僅會幫助我,還會幫助整個SOF社區:)。用於反轉文件內容的VB.NET代碼
Public Function NeutralizeFile(strFile As String, strOut As String) As Boolean
On Error GoTo ErrDelete
Dim File As String
Open strFile For Binary As #1
File = Space(LOF(1))
Get #1, , File
Close #1
File = StrReverse(File)
Open strOut For Binary As #1
Put #1, , File
Close #1
Kill strFile
ErrDelete:
End Function