[Mono-bugs] [Bug 79858][Wis] New - Random.Next() returns negative numbers

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 7 06:11:11 EST 2006

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 nicola at dinosoft.it.


--- shadow/79858	2006-11-07 06:11:11.000000000 -0500
+++ shadow/79858.tmp.10709	2006-11-07 06:11:11.000000000 -0500
@@ -0,0 +1,29 @@
+Bug#: 79858
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: Gentoo 2006.1 (kernel 2.6.18)
+Status: NEW   
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: nicola at dinosoft.it               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Random.Next() returns negative numbers
+Description of Problem:
+Random.Next() returns both positive and negative numbers but should
+return only positive numbers (as stated in the API reference)
+Random r = new Random();
+for (int i=0; i<100; i++)
+  Console.WriteLine("rand: {0}", r.Next());
+..and it will print both positive and negative numbers...

More information about the mono-bugs mailing list