Link to home
Start Free TrialLog in
Avatar of cmdolcet
cmdolcetFlag for United States of America

asked on

How to convert a numerica serial number into an 8 bit array

How can i convert a serial number (0013a200-402c4bca) into an 8 bit array like so

[0] x00
[1] x13
[2] xa2
[3] x00
[4] x40
[5] x2c
[6]x4b
[7]xca

How can I do this in vb?
Avatar of alainbryden
alainbryden
Flag of Canada image

If the serial number is stored in a string, use the .substring command to extract the pieces of the id.

--
Alain
Avatar of cmdolcet

ASKER

but how to i place it into the byte array?
ASKER CERTIFIED SOLUTION
Avatar of alainbryden
alainbryden
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It says array bounds cannot appear in type specific
Dim arrOfBytes(8) As Byte

I couldn't remember the exact syntax for VB.Net. I'm sure you figured it out on your own though.

--
Alain