[Mono-bugs] [Bug 78546][Cri] New - Double.TryParse throws exception
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed May 31 01:16:39 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by leppie at webmail.co.za.
http://bugzilla.ximian.com/show_bug.cgi?id=78546
--- shadow/78546 2006-05-31 01:16:39.000000000 -0400
+++ shadow/78546.tmp.23844 2006-05-31 01:16:39.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 78546
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Critical
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: leppie at webmail.co.za
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Double.TryParse throws exception
+
+using System;
+using System.Globalization;
+
+class Foo
+{
+ static void Main()
+ {
+ string token = "E";
+ Double d;
+
+ if (Double.TryParse
+(token,NumberStyles.Integer,NumberFormatInfo.InvariantInfo,out d)) {}
+ if (Double.TryParse
+(token,NumberStyles.Any,NumberFormatInfo.InvariantInfo,out d)) {}
+ }
+}
+
+>mono Double.TryParse.exe
+
+Unhandled Exception: System.FormatException: Unknown char: E
+in <0x00bfd> System.Double:Parse (System.String s, NumberStyles style,
+IFormatProvider provider, Boolean tryParse, System.Double result,
+System.Exception exc)
+in <0x00024> System.Double:TryParse (System.String s, NumberStyles style,
+IFormatProvider provider, System.Double result)
+in <0x0002c> Foo:Main ()
More information about the mono-bugs
mailing list