将代码转为C#代码
哪位兄弟帮以下VB代码转为C#代码,谢谢。
Dim ifile As Integer, j As Integer
Dim vByte As Byte
Dim lLoc As Long
Dim ENcrt as string
Dim Estr as string
ENcrt="abcdefghiklmn"
Tfile="D:\123.txt"
iFile = FreeFile()
Open Tfile For Binary Access Read Write As #ifile
For lLoc = 1 To LOF(ifile)
Get #iFile, lLoc, vByte
For j = 1 To Len(ENcrt)
vByte = vByte Xor Asc(Mid(ENcrt, j, 1))
Next j
Put #ifile, lLoc, vByte
Next lLoc
Close #ifile
Open Tfile For Input As #1
Line Input #1, Estr
Close #1
DelFile Ffile