1 2 3 4 5 6 7 8 9 10 11 12 13 | Public Function HexStr2ByteArray(ByVal data As String) As Byte() Dim sendData As Byte() = New Byte((data.Length / 2) - 1) {} For i As Integer = 0 To (sendData.Length - 1) sendData(i) = "&H" & data.Substring(i * 2, 2) Next i Return sendData End Function |
沒有留言:
張貼留言