[Mono-bugs] [Bug 75512][Nor] Changed - execution-time problem with initialization of static enum array

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 7 23:41:53 EST 2005

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 nathan at mammoth.com.au.


--- shadow/75512	2005-08-23 18:29:03.000000000 -0400
+++ shadow/75512.tmp.29920	2005-11-07 23:41:53.000000000 -0500
@@ -148,6 +148,21 @@
 Interestingly, csc does not generate a static byte array+a call
 to InitializeArray, but it generates code to initialize the array now
 matter how large it is. Maybe we should do the same instead of trying
 to track down the cause of this crazy exception.
+------- Additional Comments From nathan at mammoth.com.au  2005-11-07 23:41 -------
+I have just run into this problem.  I'm not using static, just
+creating this array in a method:
+	DayOfWeek[] days = { DayOfWeek.Sunday,  DayOfWeek.Monday,
+DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday,
+DayOfWeek.Friday, DayOfWeek.Saturday };
+Compiled this .dll with Mono; when ran on Microsoft.NET 1.1 it
+throws an exception during 
+  System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array
+array, RuntimeFieldHandle fldHandle) 

More information about the mono-bugs mailing list