0

Possible Duplicate:
Convert a binary string representation to a byte array

I have a string s = "010101010001..." of ones and zeros that I would like to write to a binary file. How is this done?

1
  • Thank you, that is the answer I was looking for. I did look through quite a few topics on this site - however, I mostly found going from Binary to String. Commented Jan 4, 2012 at 23:35

1 Answer 1

3

Split the string every 8 characters and then convert it to a Byte with Convert.ToByte.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.