XmlNodeEventArgs.Text 属性

定义

获取正在被反序列化的 XML 节点的文本。Gets the text of the XML node being deserialized.

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

属性值

正在被反序列化的 XML 节点的文本。The text of the XML node being deserialized.

示例

下面的示例打印导致 UnknownNode 事件发生的未知 XML 节点的文本。The following example prints the text of the unknown XML node that caused the UnknownNode event to occur.

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

适用于

另请参阅