6
Answers

Converting string to byte

Administrator

Administrator

21y
4.4k
1
BinaryConverter.ToString(byte[]) converts a byte array to a string such as "AA-7E-81". Does anybody know how to do the reverse conversion? The obvious approach is to parse the string manully, but I think .net framework could have something to facilitate this operation. I came across this problem when I needed to persist a byte array into an XML file. If anybody know the better approach than BinaryConverter.ToString, please let me know.
Answers (6)