<PackageReference Include="System.Xml.XDocument" Version="4.0.11-beta-23409" />

System.Xml.Linq.XDeclaration

public class XDeclaration
Represents an XML declaration.
public string Encoding { get; set; }

Gets or sets the encoding for this document.

public string Standalone { get; set; }

Gets or sets the standalone property for this document.

public string Version { get; set; }

Gets or sets the version property for this document.

public XDeclaration(string version, string encoding, string standalone)

Initializes a new instance of the XDeclaration class with the specified version, encoding, and standalone status.

public XDeclaration(XDeclaration other)

Initializes a new instance of the XDeclaration class from another XDeclaration object.