Create a new instance of the XAttribute class from the specified name and value.
using System;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
publicclass MainClass{
publicstaticvoid Main(){
XElement root = new XElement("Root",new XAttribute("AnAttributeName", "Content"));
}
}