Writes the contents of the collection to a System.IO.BinaryWriter.
- writer
- The System.IO.BinaryWriter used to write the serialized collection to a stream or encoded string.
The SessionStateItemCollection.Serialize(System.IO.BinaryWriter) method can be used to write the contents of a System.Web.SessionState.SessionStateItemCollection collection to the session store.
To retrieve a serialized System.Web.SessionState.SessionStateItemCollection object from the session store, use the SessionStateItemCollection.Deserialize(System.IO.BinaryReader) method.