XElement.NodeType gets the node type for this node.
using System;
using System.Linq;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
publicclass MainClass{
publicstaticvoid Main(){
XElement el1 = new XElement("Root", "content");
Console.WriteLine(el1.NodeType);
Console.WriteLine();
}
}