Value Property
Collapse the table of content
Expand the table of content

SerializationInfoEnumerator.Value Property

 

Gets the value of the item currently being examined.

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

public object Value { get; }

Property Value

Type: System.Object

The value of the item currently being examined.

Exception Condition
InvalidOperationException

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

The following code example demonstrates the Value property. This code example is part of a larger example provided for the SerializationInfo class.

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);
    }
}

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft