双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

我哭啊,哪位大神帮我翻译一句VB的代码到C# ?

wuhuanghao wuhuanghao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

Dim i, s
for i = 1 to Len(str)
s = s & (asc(mid(str, i, 1)) xor key) & ","
next
'----------
Dim t
t = (DateDiff("s", #1/1/1970#, Now) * 1000) / 100
s = s & t
'----------
s = s & key & m
'----------




x = Split(str, ",")
m = Right(x(Ubound(x)), 1)
key = Mid(x(Ubound(x)), len(x(Ubound(x)))-3+1, 2)
'Wscript.Echo "M = " & m
'Wscript.Echo "Key = " & key
'----------
Dim i, s
for i = lbound(x) to (ubound(x) - 1)
s = s & Chr(Int(x(i)) xor key)
next


这两段代码翻译成C#的代码,应该怎么写?
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
wuhuanghao
C# 111,129 成员 642,540 内容