XDocument
has an overloaded constructor.
XDocument()
XDocument([ParamArray] content: obj[])
XDocument(XDocument)
XDocument(XDeclaration,[ParamArray] content: obj[])
so when I try to create an XDocument
new XDocument(
new XDeclaration("1.0", "utf-8", "no"),
new XElement(XName.Get "Foo"))
it gives me the error
A unique overload for method XDocument...
I ASSUME it can't work out whether to use
XDocument([ParamArray] content: obj[])
or
XDocument(XDeclaration,[ParamArray] content: obj[])
How do I force it to choose the correct one?