conversion

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Is it possible to convert a hex/ascii string to binary?

ie.
Dim s As String
s = "AA"

output = Hex2Bin(s) '10101010

also is there a bin to hex conversion function?
 
Try Convert.ToByte(), such as:

Dim s As String

s = "AA"

Dim b As Byte

b = Convert.ToByte(s, 16)
 
The System.Collections.BitArray class takes an array of bytes in its
constructor and gives you the binary representation.

Yves
 
Back
Top