XmlNodeEventArgs.Name 属性

定义

获取正在被反序列化的 XML 节点的名称。

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

属性值

正在被反序列化的节点的名称。

示例

以下示例打印导致 UnknownNode 事件发生的未知节点的名称。

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

适用于

另请参阅