Quellcode durchsuchen

2004-02-05 Atsushi Enomoto <[email protected]>

	* XmlConvert.cs : ToSingle() and ToDouble() should be culture
	  independent. Patch by Rodolfo Campero.

svn path=/trunk/mcs/; revision=22779
Atsushi Eno vor 22 Jahren
Ursprung
Commit
ad968a22b0

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2004-02-05  Atsushi Enomoto <[email protected]>
+
+	* XmlConvert.cs : ToSingle() and ToDouble() should be culture 
+	  independent. Patch by Rodolfo Campero.
+
 2004-02-04  Atsushi Enomoto <[email protected]>
 
 	* DTDObjectModel.cs : Never expand entity on ScanEntityValue().

+ 2 - 2
mcs/class/System.XML/System.Xml/XmlConvert.cs

@@ -247,7 +247,7 @@ namespace System.Xml {
 				return Double.NegativeInfinity;
 			if (s == "NaN")
 				return Double.NaN;
-			return Double.Parse (s, floatStyle);
+			return Double.Parse (s, floatStyle, CultureInfo.InvariantCulture);
 		}
 
 		public static Guid ToGuid(string s)
@@ -286,7 +286,7 @@ namespace System.Xml {
 				return Single.NegativeInfinity;
 			if (s == "NaN")
 				return Single.NaN;
-			return Single.Parse(s, floatStyle);
+			return Single.Parse(s, floatStyle, CultureInfo.InvariantCulture);
 		}
 
 		public static string ToString(Guid value)