The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
XDeclaration Constructor (String^, String^, String^)
.NET Framework (current version)
Initializes a new instance of the XDeclaration class with the specified version, encoding, and standalone status.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Parameters
- version
-
Type:
System::String^
The version of the XML, usually "1.0".
- encoding
-
Type:
System::String^
The encoding for the XML document.
- standalone
-
Type:
System::String^
A string containing "yes" or "no" that specifies whether the XML is standalone or requires external entities to be resolved.
The following example creates a document that contains a declaration.
This example produces the following output:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--This is a comment-->
<Root>content</Root>
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: