SerializationInfoEnumerator::MoveNext Method ()

 

Updates the enumerator to the next item.

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

public:
virtual bool MoveNext() sealed

Return Value

Type: System::Boolean

true if a new element is found; otherwise, false.

To initialize the enumerator, call MoveNext and go through each item until you reach the last element.

The following code example demonstrates calling the MoveNext method. This code example is part of a larger example provided for the SerializationInfo class.

private:
    static void DisplaySerializationInfo(SerializationInfo^ info)
    {
        Console::WriteLine("Values in the SerializationInfo:");
        for each (SerializationEntry^ infoEntry in info)
        {
            Console::WriteLine("Name={0}, ObjectType={1}, Value={2}",
                infoEntry->Name, infoEntry->ObjectType, infoEntry->Value);
        }
    }

.NET Framework
Available since 1.1
Return to top
Show: