简单的VB代码帮助 [英] simple VB code help

查看:28
本文介绍了简单的VB代码帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名 Java 开发人员,我希望将以下代码转换为 Java任何 VB 开发者都可以告诉我以下是做什么的吗?

I am a java devloper and I wish to convert following code to java can any VB devloper tell me what following does?

    temp8Bit = 0
    temp8Bit = Convert.ToByte(tempRMACode.ToCharArray().GetValue(0))
             + Convert.ToByte((tempRMACode.ToCharArray()).GetValue(7))
    rmaValidationCode += String.Format("{0:X2}", temp8Bit)

tempRMACode 是一个字符串

tempRMACode is a string

推荐答案

将 tempRMACode 的第 1 个和第 8 个字符的字节值相加,然后以0:X2"的格式附加到 rmaValidationCode 中字符串的 2 个字符的十六进制表示 (temp8Bit).

It is adding the byte values of the 1st and the 8th characters of tempRMACode, then appending it to rmaValidationCode in the format of "0:X2" which is a 2-character hexadecimal representation of the string (temp8Bit).

这篇关于简单的VB代码帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆