adBrite

Your Ad Here

music

BidVertiser

Tuesday, November 9, 2010

Serialize - BinaryFormatter


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

clicksor

Go Daddy Girl Ella Koon- $7.49 .COM Domains
CompUSA