title: Write XML in Base64 encoding
body: <p>Following my questions about storing data, it has been suggested that I could use XML but then obfuscate the file by encoding it using Base64. I like this idea, and I have achieved what I want in XML, but I don't know how to save it in Base64. This is my code so far:</p>
  
  <pre><code>XmlWriterSettings settings = new XmlWriterSettings();
  settings.Indent = true;
  
  XmlWriter write = XmlWriter.Create("C:\\Users\\Andy\\Desktop\\database.xml", settings);
  write.WriteStartDocument();
  write.WriteStartElement("Database");
  write.WriteStartElement("Entry");
  write.WriteAttributeString("key", "value");
  write.WriteEndElement();
  write.WriteEndElement();
  
  write.Flush();
  write.Close();
  </code></pre>