[Mono-bugs] [Bug 56744][Maj] New - Convert.ToInt32(x, 10), doesn't take negative numbers
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 9 Apr 2004 05:56:41 -0400 (EDT)
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 dave-gnome-bugs@earth.li.
http://bugzilla.ximian.com/show_bug.cgi?id=56744
--- shadow/56744 2004-04-09 05:56:41.000000000 -0400
+++ shadow/56744.tmp.18164 2004-04-09 05:56:41.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 56744
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: dave-gnome-bugs@earth.li
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Convert.ToInt32(x, 10), doesn't take negative numbers
+
+Description of Problem:
+
+If you call Convert.ToInt32("-1", 10), you get an exception. This doesn't
+happen on MS.NET
+
+
+Steps to reproduce the problem:
+1.
+using System;
+class t1
+{
+ static void Main(string [] args ) {
+ Convert.ToInt32("-1", 10);
+ }
+}
+
+Actual Results:
+Unhandled Exception: System.FormatException: This is an invalid string: -1
+in [0x00086] (at
+/home/sheldon/hacking/mono/raw_cvs/mcs/class/corlib/System/Convert.cs:2366)
+System.Convert:ConvertFromBase (string,int)
+in [0x00002] (at
+/home/sheldon/hacking/mono/raw_cvs/mcs/class/corlib/System/Convert.cs:1167)
+System.Convert:ToInt32 (string,int)
+in <0x00021> t1:Main (string[])
+
+
+Expected Results:
+Nothing