Hello, I am trying to send an object over a socket using C#. I originally used a memorystream and binaryformatter, but to do this I need to include a reference from program1 to program2. I don't want to have a reference, so I just want to be able to transform an object to a byte but this does not seem to work either when casting it on the otherside of the wire back to object. So for instance
Object obj = MyClassObj;
byte bytes = (byte)obj;
(send over wire)
Program1 -> Program2. It seems as though it does not transfer the byte array correctly, I am guessing because I didn't serialize it correctly. Does anyone know how I can create a byte array to send over a wire without using a memorystream/binaryformatter, or how I can do it without having to reference the other application?