将代码从VB传递到C# [英] Pass Code from VB to C#
本文介绍了将代码从VB传递到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好.
我在Visual Basic中有一个加密和解密代码,所以我试图用C#编写它,但是以下代码有问题:
Hello there.
I have an encryption and decryption code in visual basic, so I''m trying to make it in C#, but I have a problem with the following code:
Pass2 = Pass2 & Right("0" & Hex(Asc(Code) Xor Asc(CAR)), 2)
我不知道如何使用Hex,Asc和Xor函数或如何更改它们.
我希望有人可以帮助我进行转换或告诉我我需要做什么.
感谢
I don''t know what can I do with the Hex, Asc and Xor functions or how can I change them.
I hope that someone can help me converting this or telling me what I need to do.
Thanks
推荐答案
根据此转换器 [ ^ ]:
According to this converter[^]:
Pass2 = Pass2 + Strings.Right("0" + Conversion.Hex(Strings.Asc(Code) ^ Strings.Asc(CAR)), 2)
(实际上,它认为这是一个比较,但是我更改了它,因为它看起来像是对我的分配.)
(Well actually it thought it was a comparison, but I changed it because it looks like an assignment to me.)
这篇关于将代码从VB传递到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文