Comment obtenir XML avec l'en-tête (<?xml version=“1.0”...)?

De considérer les éléments suivants du code simple qui crée un document XML et l'affiche.

XmlDocument xml = new XmlDocument();
XmlElement root = xml.CreateElement("root");
xml.AppendChild(root);
XmlComment comment = xml.CreateComment("Comment");
root.AppendChild(comment);
textBox1.Text = xml.OuterXml;

il affiche, comme prévu:

<root><!--Comment--></root>

Il n'est pas, cependant, l'affichage de la

<?xml version="1.0" encoding="UTF-8"?>   

Alors, comment puis-je obtenir ainsi?

OriginalL'auteur ispiro | 2013-02-12