[Mono-bugs] [Bug 72221][Nor] New - double tryparse with hex numbers returns opposite of .net

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 4 Feb 2005 14:58:38 -0500 (EST)

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 jluke@cfl.rr.com.


--- shadow/72221	2005-02-04 14:58:38.000000000 -0500
+++ shadow/72221.tmp.32765	2005-02-04 14:58:38.000000000 -0500
@@ -0,0 +1,36 @@
+Bug#: 72221
+Product: Mono: Class Libraries
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jluke@cfl.rr.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: double tryparse with hex numbers returns opposite of .net
+this little test prints true on mono and
+false on .net  I would have expected "0xdead" to be the format it expected,
+but it only seems to work like this. The MonoDevelop lexer uses this to
+test if a number is valid.
+using System;
+using System.Globalization;
+class Driver
+    static void Main (string[] args)
+    {
+        double d;
+        Console.WriteLine (!double.TryParse ("0dead",
+NumberStyles.HexNumber, null, out d));
+        // true on mono
+    }