XmlAttributeEventArgs::ObjectBeingDeserialized Property

 

Gets the object being deserialized.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public:
property Object^ ObjectBeingDeserialized {
	Object^ get();
}

Property Value

Type: System::Object^

The object being deserialized.

The following example prints the value returned by the ToString method when the Deserialize method encounters an unknown attribute.

private:
   void serializer_UnknownAttribute( Object^ /*sender*/, XmlAttributeEventArgs^ e )
   {
      System::Xml::XmlAttribute^ attr = e->Attr;
      Console::WriteLine( "Unknown Attribute Name and Value: {0} = '{1}'",
         attr->Name, attr->Value );
      Object^ x = e->ObjectBeingDeserialized;
      Console::WriteLine( "ObjectBeingDeserialized: {0}", x );
   }

.NET Framework
Available since 1.1
Return to top
Show: