0

I need to convert object like instance of my class Message (string id, string message, string datetime) in Byte Array. Send it to server, and server send the same message to other client. At least I need to convert this Byte Array into Message

I try BinaryFormatter with MemoryStream but doesn't work with UWP

Sum_Pie
  • 175
  • 3
  • 15
  • if all your properties are string, just serialize it to json. This is much easier to deal with than binary serialization. – Jason Dec 09 '17 at 19:02
  • Of according to said Jason, i would use **json**. In my app i obtain a serialize object from a rest and desserialize and i serialize and send to rest again. There is a response in this link, i wish that help you: `https://stackoverflow.com/questions/16072709/converting-string-to-byte-array-in-c-sharp` – pnet Dec 10 '17 at 16:45

0 Answers0