[Mono-bugs] [Bug 81339][Nor] New - Int32.Parse does not support trailing currency symbol

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Apr 9 08:35:49 EDT 2007


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 gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=81339

--- shadow/81339	2007-04-09 08:35:49.000000000 -0400
+++ shadow/81339.tmp.13122	2007-04-09 08:35:49.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 81339
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Int32.Parse does not support trailing currency symbol
+
+Int32.Parse apparently deos not support parsing a string containing a 
+trailing currency symbol, and as a result no euro currency can be parsed 
+(eg. 3,00 €).
+
+To reproduce, compile and run this code snippet:
+
+using System;
+using System.Globalization;
+
+class Program
+{
+  static void Main ()
+  {
+    CultureInfo culture = new CultureInfo ("nl-BE");
+    int x = int.Parse (3.ToString ("c", culture), NumberStyles.Currency, 
+culture);
+    Console.WriteLine (x);
+  }
+}
+
+Actual result:
+Unhandled Exception: System.FormatException: Input string was not in the 
+correct format...
+
+Expected result:
+3


More information about the mono-bugs mailing list