This documentation is archived and is not being maintained.

Formatter.GetNext Method

Returns the next object to serialize, from the formatter's internal work queue.

Namespace:  System.Runtime.Serialization
Assembly:  mscorlib (in mscorlib.dll)

protected virtual Object GetNext(
	out long objID


Type: System.Int64%

The ID assigned to the current object during serialization.

Return Value

Type: System.Object
The next object to serialize.


The next object retrieved from the work queue did not have an assigned ID.

Objects are returned in a first in first out order based on how they were passed to Schedule. The ID of the object is put into the objID parameter and the object is returned from the function.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0