Hi,
I need to send byte[] msg through UDP protocol.
I'm not sure what is the best way to convert Object to Byte[].
If I use serialization, I'll need to desirialize this on the receiver side, correct??
MemoryStream ms = new MemoryStream();
BinaryFormatter bf = new BinaryFormatter ();
bf.Serialize(ms , obj);
ms.ToArray();
I don't have the source code of the receiver, so how can I do it right?
Thanks
I need to send byte[] msg through UDP protocol.
I'm not sure what is the best way to convert Object to Byte[].
If I use serialization, I'll need to desirialize this on the receiver side, correct??
MemoryStream ms = new MemoryStream();
BinaryFormatter bf = new BinaryFormatter ();
bf.Serialize(ms , obj);
ms.ToArray();
I don't have the source code of the receiver, so how can I do it right?
Thanks
Comment