SessionStateItemCollection.Serialize Method

Writes the contents of the collection to a BinaryWriter.

Namespace: System.Web.SessionState
Assembly: System.Web (in system.web.dll)

public:
void Serialize (
	BinaryWriter^ writer
)
public void Serialize (
	BinaryWriter writer
)
public function Serialize (
	writer : BinaryWriter
)
Not applicable.

Parameters

writer

The BinaryWriter used to write the serialized collection to a stream or encoded string.

The Serialize method can be used to write the contents of a SessionStateItemCollection collection to the session store.

To retrieve a serialized SessionStateItemCollection object from the session store, use the Deserialize method.

The following code example creates and populates a SessionStateItemCollection collection and writes the contents to a file using the Serialize method.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: