共用方式為


XmlNodeEventArgs.ObjectBeingDeserialized 屬性

定義

取得要還原序列化的物件。

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

屬性值

Object

要進行還原序列化的 Object

範例

下列範例會在 方法遇到未知的 XML 節點時 Deserialize ,列印 方法所 ToString 傳回的值。

private:
   void serializer_UnknownNode( Object^ /*sender*/, XmlNodeEventArgs^ e )
   {
      Object^ o = e->ObjectBeingDeserialized;
      Console::WriteLine( "Object being deserialized: {0}", o );
   }
private void serializer_UnknownNode
(object sender, XmlNodeEventArgs e)
{
   object o = e.ObjectBeingDeserialized;
   Console.WriteLine("Object being deserialized: "
   + o.ToString());
}
Private Sub serializer_UnknownNode _
                (ByVal sender As Object, _
                 ByVal e As XmlNodeEventArgs)
    Dim o As Object = e.ObjectBeingDeserialized
    Console.WriteLine("Object being deserialized: " & o.ToString())
End Sub

適用於

另請參閱