我已经给出了一些C#代码,它定义了一些私有字符串,但我不确定它在做什么,并且需要为我的项目转换为VB,但是如果有人可能需要一点时间解释并可能提供转换?将C#转换为VB - 私有字符串语句
private string GetChecksum(StringBuilder buf)
{
// calculate checksum of message
uint sum = 0;
for (int i = 0; i < buf.Length; i++)
{
sum += (char)buf[i];
}
return string.Format("{0:X04}", sum);
}
http://converter.telerik.com/ – Plutonix 2015-03-02 16:07:32
它是你不明白的_syntax_或_procedure_吗?它所做的就是将字符串中每个字符的ASCII值相加,最终结果模65536,因为没有溢出检查。 – 2015-03-02 16:10:50