Mega Code Archive

 
Categories / C# / XML LINQ
 

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; public class MainClass{    public static void Main(){         XElement root = new XElement("Root",new XAttribute("AnAttributeName", "Content"));    } }