Reputation: 9307
How can I convert the string 00 00 EF 01 00 00 00 00 00 00
to text?
I googled and found a online tool which can convert binary to text only.
Upvotes: 1
Views: 220
Reputation: 1550
I'm assuming here the text you've supplied is "as is", with spaces separating the hex digit pairs.
You can convert each hex value with, e.g.:
byte.Parse("EF", System.Globalization.NumberStyles.AllowHexSpecifier)
So you can convert the whole to a byte array:
var byteArray = "0A 0A 0A".Split(' ').Select(s => byte.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier)).ToArray();
However, you don't specify what character encoding your hex stream represents. Once you've got your byte array, you'll need to convert it as necessary.
Upvotes: 1