title: xml serialization of double
body: <p>when i serialize my object, my double value gets printed as -9.9999999999988987E-05
  How can i fix this so i can get a number with 4 decimal places?</p>
  
  <pre><code>public class DecisionBar
      {
      public DateTime bartime 
           { get; set; }
      public string frequency
               { get; set; }
      public bool HH7
              {get;set;}
      public bool crossover
              {get;set;}
      public double mfe
              {get;set;}
          public double mae
              {get;set;}
                  public double currentprofitability
              {get;set;}
      public double entryPointLong
              {get;set;}
      public double entryPointShort
              {get;set;}
      public double exitStopFull
              {get;set;}
      public double exitStopPartial 
                  {get;set;}
       [XmlAttribute]         
      public string EntryOrExit
                  {get;set;}
  //    public DecisionBar()
  //          {
  //          crossover =false;
  //          }
  
      }
  </code></pre>
  
  <p>Output.</p>
  
  <pre><code>&lt;DecisionBar&gt;
      &lt;bartime&gt;2012-07-24T08:59:00&lt;/bartime&gt;
      &lt;frequency&gt;1 MINUTES&lt;/frequency&gt;
      &lt;HH7&gt;false&lt;/HH7&gt;
      &lt;crossover&gt;false&lt;/crossover&gt;
      &lt;mfe&gt;0.00019999999999997797&lt;/mfe&gt;
      &lt;mae&gt;-9.9999999999988987E-05&lt;/mae&gt;
      &lt;currentprofitability&gt;0&lt;/currentprofitability&gt;
      &lt;entryPointLong&gt;0&lt;/entryPointLong&gt;
      &lt;entryPointShort&gt;0&lt;/entryPointShort&gt;
      &lt;exitStopFull&gt;0&lt;/exitStopFull&gt;
      &lt;exitStopPartial&gt;0&lt;/exitStopPartial&gt;
  &lt;/DecisionBar&gt;
  </code></pre>