conversion

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?
 
E

Ed Kaim [MSFT]

Try Convert.ToByte(), such as:

Dim s As String

s = "AA"

Dim b As Byte

b = Convert.ToByte(s, 16)
 
P

phoenix

The System.Collections.BitArray class takes an array of bytes in its
constructor and gives you the binary representation.

Yves
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top