Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Converting string to byte

Feb 20 2003 5:39 PM
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)