title: Specify encoding XmlSerializer
body: <p>I've a class correctly defined and after serialize it to XML I'm getting no encoding.</p>
  
  <p>How can I define encoding "ISO-8859-1"?</p>
  
  <p>Here's a sample code</p>
  
  <pre><code>var xml = new XmlSerializer(typeof(Transacao));
  var file = new FileStream(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "transacao.xml"),FileMode.OpenOrCreate);            
  xml.Serialize(file, transacao);            
  file.Close();
  </code></pre>
  
  <p>Here are the beginning of xml generated</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;requisicao-transacao xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;dados-ec&gt;
      &lt;numero&gt;1048664497&lt;/numero&gt;
  </code></pre>