divyang4481 / xstream-dot-net

Automatically exported from code.google.com/p/xstream-dot-net
1 stars 1 forks source link

Some values cause exceptions when saving/loading between certain cultures #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here is a sample program to reproduce the error I am encountering:

  using System.Globalization;
  using System.Windows.Forms;
  using Xstream.Core;

  namespace XStreamTest
  {
      class Program
      {
          class Foo { public double x = 5.0; }

          static void Main()
          {
              Application.CurrentCulture = new CultureInfo("fr-FR");

              XStream x = new XStream();
              x.Alias("foo", typeof(Foo));
              x.FromXml("<foo><x>5.0</x></foo>");
          }
      }
  }

I've attached sample files containing the fix I implemented for our copy of 
the source.

Original issue reported on code.google.com by jcromar...@gmail.com on 28 Oct 2008 at 2:03

Attachments: