lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r568630 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
Date Wed, 22 Aug 2007 14:34:53 GMT
Author: aroush
Date: Wed Aug 22 07:34:52 2007
New Revision: 568630

URL: http://svn.apache.org/viewvc?rev=568630&view=rev
Log:
Fix: LUCENENET-85 "SupportClass.Parse and System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator"

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=568630&r1=568629&r2=568630&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Wed Aug 22 07:34:52 2007
@@ -649,9 +649,9 @@
             try
             {
                 if (s.EndsWith("f") || s.EndsWith("F"))
-                    return System.Single.Parse(s.Substring(0, s.Length - 1));
+                    return System.Single.Parse(s.Substring(0, s.Length - 1).Replace(".",
System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
                 else
-                    return System.Single.Parse(s);
+                    return System.Single.Parse(s.Replace(".", System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
             }
             catch(System.FormatException fex)
             {



Mime
View raw message