SerializationInfoEnumerator::Name Property

 

Gets the name for the item currently being examined.

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

public:
property String^ Name {
	String^ get();
}

Property Value

Type: System::String^

The item name.

Exception Condition
InvalidOperationException

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

The following code example demonstrates the Name 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);
        }
    }

.NET Framework
Available since 1.1
Return to top
Show: