Hi,
I have been experimenting with LINQ to XML and have run across a very basic problem. For some reason, I am not seeing a XML declaration when dumping the tree to System.Console.
using System;
using System.Xml.Linq;
...
public static void Main(string[] args)
{
// Build tree.
XDocument xd = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
// Output tree.
System.Console.WriteLine(xd);
// Pause.
System.Console.ReadLine();
}
Can someone explain what basic thing I'm doing wrong ?
Thanks,
Scott