XmlNodeEventArgs.ObjectBeingDeserialized 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得要還原序列化的物件。
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。
範例
下列範例會在 方法遇到未知的 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