I have a problem with converting a byte array string back to a literal. I am reading a string from a xml file which was converted to a byte array (Encoding.Unicode.GetBytes(string)
). I dose not developed the xml export. Now I would like to convert the value back to a string.
For example (note that it is a real string)
"AQwAtADQAMQA5AAwADEAfQAAA==" back to "This is a string!"
I knew that for the encoding Encoding.Unicode.GetBytes(string)
was used. My fist idea was, to read two values, calculate the byte value and convert them back to a unicode string. Is there any better solution? Thanks.