[Mono-bugs] [Bug 53800][Wis] New - Unable to run a piece of code which works fine in .NET 1.1

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 3 Feb 2004 09:26:20 -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 patrick1.vandijk@ps.ge.com.

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

--- shadow/53800	2004-02-03 09:26:20.000000000 -0500
+++ shadow/53800.tmp.31490	2004-02-03 09:26:20.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 53800
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: patrick1.vandijk@ps.ge.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unable to run a piece of code which works fine in .NET 1.1
+
+Compile the following piece of code:
+
+
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+class Demo2
+{
+	static void Main ()
+	{
+	HatchStyle[] styles = new HatchStyle [ 11 ] {
+HatchStyle.Percent05, HatchStyle.Percent10, HatchStyle.Percent20, 
+							      
+HatchStyle.Percent30, HatchStyle.Percent40, HatchStyle.Percent50, 
+							      
+HatchStyle.Percent60, HatchStyle.Percent70, HatchStyle.Percent80, 
+							      
+HatchStyle.Percent90, HatchStyle.Percent90 };
+	}
+}
+
+
+Compiled with:
+
+mcs -r:System.Drawing demo3.cs
+
+And running it produces:
+
+Unhandled Exception: System.ArgumentException: Value does not fall within 
+the expected range.
+   at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array 
+array, RuntimeFieldHandle fldHandle)
+   at Demo2.Main()