[Mono-bugs] [Bug 70474][Nor] New - 50.ToString (" ###"); gives " 050"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Dec 2004 18:24:26 -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 bmaurer@users.sf.net.

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

--- shadow/70474	2004-12-11 18:24:26.000000000 -0500
+++ shadow/70474.tmp.20538	2004-12-11 18:24:26.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 70474
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: 50.ToString (" ###"); gives " 050"
+
+[benm@omega benm]$ cat t.cs
+using System;
+ 
+class X {
+        static void Main ()
+        {
+                int x = 50;
+                string exp = " 50";
+                string res = x.ToString (" ###");
+ 
+                if (exp != res)
+                        Console.WriteLine ("{0}, {1}, {2}", x, exp, res);
+ 
+        }
+}
+[benm@omega benm]$ mcs t.cs
+[benm@omega benm]$ mono t.exe
+50,  50,  050
+
+On msft you get:
+C:\Inetpub\ftproot>t
+
+C:\Inetpub\ftproot>
+
+Note that if you remove the space forom the format string, everything works