将代码转为C#代码

sanduVB sanduVB 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
哪位兄弟帮以下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
...全文
评论 20
收藏 已收藏
分享
返回顶部
sanduVB
C# 111,129 成员 642,538 内容