Binary String to bytes and/or HEX-string?

K

Kenneth Priisholm

Hi there.

I'm trying to find a built-in function in the framework for converting
binary formatted strings into either bytes or HEX-values; something that
works in a similar fashion as BitConverter.ToString(byte[]), which converts
a byte-array into HEX, or Convert.ToString(byte, 2), which converts a byte
into a binary string - just the other way arround.

Am I just looking in the wrong direction, or is there really no built-in
function/formatter for this task? Since I've browsed msdn and all sorts of
sites, but so far haven't had any luck, it seems, that the task must be so
trivial that it's hardly documented - or what?

Thank you in advance!

Best regards,
Ken.
 
K

Kenneth Priisholm

Hi William.

Thank you, that just made my day! :)

- Just as trivial, simple and cool as pressumed...

As mentioned in the post, I think the documentation generally lacks a
bit on the formatting side; do you know of any good books, articles or
other sources to clear up this matter for the
not-so-experienced-regarding-formatting-in-the-.Net-framework?

Cheers,
Ken.
 

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