Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Get bytes from a string of binary

$
0
0

Hi,

If I have a string like

"0000100000000001"

How do I convert it to bytes?

Something like

byte[] my_bytes = BitConverter.GetBytes("0000100000000001");

Which would result in the following:

my_bytes [0] = 0x08

my_bytes [1] = 0x01

Help much appreciated.


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>