[Mono-bugs] [Bug 22140] New - icall for decimal2string fails test

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 Mar 2002 16:02:45 -0000


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 ndrochak@gol.com.

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

--- shadow/22140	Tue Mar 19 11:02:45 2002
+++ shadow/22140.tmp.23805	Tue Mar 19 11:02:45 2002
@@ -0,0 +1,35 @@
+Bug#: 22140
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: icall for decimal2string fails test
+
+The following code should convert the decimal 12.345678m in to the 
+string "12.35".  It returns "12.33" by mistake.
+---------------------------------------------------
+using System;
+using System.Globalization;
+
+class X {
+	public static int Main (string [] args)
+	{
+		Decimal d;
+		d = 12.345678m;
+		string s = d.ToString("F", 
+NumberFormatInfo.InvariantInfo);
+		int i = s.CompareTo("12.35");
+		return i;
+	}
+}