Mega Code Archive

 
Categories / C# Book / 05 LINQ XML
 

0538 XText

using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; class Program { static void Main() { XElement summary = new XElement("summary", new XText("An XAttribute is "), new XElement("bold", "not"), new XText(" an XNode") ); Console.WriteLine(summary); } } The output: An XAttribute is not an XNode