hcnimkar hcnimkar - 1 year ago 90
C# Question

Convert/Serialize Dictionary<string,string> to byte array byte[] in windows phone 8

I am developing applications for windows phone 8. I have dictionary of the format Dictionary. I want to convert this dictionary to byte array. According to this link dictionary can be serialized into byte array using the BinaryFormtter class. However according to this link I cannot use BinaryFormatter in windows phone 8. Is there any workaround method available so that I serialize my Dictionary?

Answer Source


byte[] content = UTF8.GetBytes(UrlEncode(body));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download