title: XML deserialization crashes on decimal parse due to formatting
body: <p>I get a System.FormatException thrown when i try to parse XML into an object. As far as I can tell, it's due to the culture used in System.Xml.Serialization.XmlSerializer.Deserialize, wich expects a dot as the decimal character, but the xml contains a comma.</p>
  
  <p>The object looks as follows:</p>
  
  <pre class="lang-cs prettyprint-override">
  <code>
  public sealed class Transaction
  {
      [XmlElement("transactionDate")]
      public DateTime TransactionDate { get; set; }
  
      [XmlElement("transactionAmount")]
      public decimal Amount { get; set; }
  
      [XmlElement("transactionDescription")]
      public string Description { get; set; }
  
      [XmlElement("transactionType")]
      public int Type { get; set; }
  
      public static Transaction FromXmlString(string xmlString)
      {
          var reader = new StringReader(xmlString);
          var serializer = new XmlSerializer(typeof(Transaction));
          var instance = (Transaction) serializer.Deserialize(reader);
  
          return instance;
      }
  }
  </code>
  </pre>
  
  <p>The xml:
  </p>
  
  <pre>
  <code>
  &lt;transaction&gt;
      &lt;transactionDate&gt; 2013-07-02 &lt;transactionDate&gt;
      &lt;transactionAmount&gt;-459,00&lt;/transactionAmount&gt;
      &lt;transactionDescription&gt;description&lt;/transactionDescription&gt;
      &lt;transactionType&gt;1&lt;/transactionType&gt;
  &lt;/transaction&gt;
  </code>
  </pre>
  
  <p>I've made it work by introducing a second property that parses the first using my own culture:
  </p>
  
  <pre>
  <code>
  namespace MyNamespace
  {
      [XmlRoot("transaction"), XmlType("Transaction")]
      public sealed class Transaction
      {
          [XmlElement("transactionDate")]
          public DateTime TransactionDate { get; set; }
  
          [XmlElement("transactionAmount")]
          public string Amount { get; set; }
  
          public decimal AmountAsDecimal {
              get
              {
                  decimal value;
                  Decimal.TryParse(Amount, NumberStyles.Any, CultureInfo.CreateSpecificCulture("sv-SE"), out value);
                  return value;
              }
          }
  
          [XmlElement("transactionDescription")]
          public string Description { get; set; }
  
          [XmlElement("transactionType")]
          public int Type { get; set; }
  
          public static Transaction FromXmlString(string xmlString)
          {
              var reader = new StringReader(xmlString);
              var serializer = new XmlSerializer(typeof(Transaction));
              var instance = (Transaction) serializer.Deserialize(reader);
  
              return instance;
          }
      }
  }
  
  </code>
  </pre>
  
  <p>which exposes an extra property that i don't want there.</p>
  
  <p>So my question is: is there another way to do this, without iterating over each element and parsing/assigning it to the object "manually"?</p>