C# How can i remove newline characters from binary?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-06-01T10:29:41Z Indexed on 2010/06/01 10:33 UTC
Read the original article Hit count: 125

Filed under:

Basically i have binary data, i dont mind if it's unreadable but im writing it to a file which is parsed and so it's importance newline characters are taken out.

I thought i had done the right thing when i converted to string....

byte[] b = (byte[])SubKey.GetValue(v[i]); s = System.Text.ASCIIEncoding.ASCII.GetString(b);

and then removed the newlines

String t = s.replace("\n","")

but its not working ?

© Stack Overflow or respective owner

Related posts about c#