SerializationInfoEnumerator.Value SerializationInfoEnumerator.Value SerializationInfoEnumerator.Value SerializationInfoEnumerator.Value Property

Definition

Gets the value of the item currently being examined.

public:
 property System::Object ^ Value { System::Object ^ get(); };
public object Value { get; }
member this.Value : obj
Public ReadOnly Property Value As Object

Property Value

The value of the item currently being examined.

Exceptions

The enumerator has not started enumerating items or has reached the end of the enumeration.

Examples

The following code example demonstrates the Value property. 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);
        }
    }
private void DisplaySerializationInfo(SerializationInfo info)
{
    SerializationInfoEnumerator e = info.GetEnumerator();
    Console.WriteLine("Values in the SerializationInfo:");
    while (e.MoveNext())
    {
        Console.WriteLine("Name={0}, ObjectType={1}, Value={2}", e.Name, e.ObjectType, e.Value);
    }
}

Applies to