以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 求助:类型转换问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=175875) |
-- 作者:237756360 -- 发布时间:2022/3/22 20:05:00 -- 求助:类型转换问题 请问 gg 这个变量如何写,拼接到第二行数组里 代码: Dim gg As String= "&HFF, &H10, &H00, &H03, &H00, &H02, &H04, &H00, &H04, &H00, &H14, &HC5, &H9F" Dim Val() As Byte = New Byte() {gg} |
-- 作者:237756360 -- 发布时间:2022/3/22 20:30:00 -- 求助! |
-- 作者:有点蓝 -- 发布时间:2022/3/22 21:04:00 -- Dim gg As String= "&HFF, &H10, &H00, &H03, &H00, &H02, &H04, &H00, &H04, &H00, &H14, &HC5, &H9F" Dim g2() As String = gg.Split(",") Dim Val(g2.Length - 1) As Byte For i As Integer = 0 To g2.Length - 1 Val(i) = HexToDec(g2(i).Trim().Replace("&H","")) Next
|