XmlNodeEventArgs.Text 属性

定义

获取正在被反序列化的 XML 节点的文本。

public:
 property System::String ^ Text { System::String ^ get(); };
public string? Text { get; }
public string Text { get; }
member this.Text : string
Public ReadOnly Property Text As String

属性值

正在被反序列化的 XML 节点的文本。

示例

以下示例打印导致 UnknownNode 事件发生的未知 XML 节点的文本。

private:
   void serializer_UnknownNode( Object^ /*sender*/, XmlNodeEventArgs^ e )
   {
      Console::WriteLine( "UnknownNode Text: {0}", e->Text );
   }
private void serializer_UnknownNode
(object sender, XmlNodeEventArgs e)
{
   Console.WriteLine
   ("UnknownNode Text: " + e.Text);
}
Private Sub serializer_UnknownNode _
                (ByVal sender As Object, _
                 ByVal e As XmlNodeEventArgs)
    Console.WriteLine("UnknownNode Text: " & e.Text)
End Sub

适用于

另请参阅