private Stream SerializeObject(object myStringToSend)
{
// Initialize a storage medium to hold the serialized object
Stream stream = new MemoryStream();
// Serialize an object into the storage medium referenced by 'stream' object.
BinaryFormatter formatter = new BinaryFormatter();
// Serialize multiple objects into the stream
formatter.Serialize(stream, myStringToSend);
// Return a stream with multiple objects
return stream;
}
No comments:
Post a Comment