Get the node type in CSharp

Description

The following code shows how to get the node type.

Example


  //  www  .  j a  va2s . c o m
  
  
    
using System;
using System.Linq;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;


public class MainClass{
   public static void Main(){
        XElement el1 = new XElement("Root", "content");
        Console.WriteLine(el1.NodeType);
        Console.WriteLine();
   }
}




















Home »
  C# Tutorial »
    XML »




Load Parse
Document
Element
Attribute
Namespace
Query
Save
Schema
Style