[Mono-devel-list] Problem with System.Reflection.ConstructorInfo

Etienne Boucher etienne at novat.qc.ca
Tue Mar 9 20:06:28 EST 2004


> The problem was in creating any reference-type array (except string and
> object) with more than 6 nulls.  Nulls, being a type of constant (and
> the only constant that can appear in these reference type arrays),
> tricked mcs into thinking the array could be initialized from a static
> field of values, which mcs would only do if there were more than 6
> values.

Aaah, wait. Again, it's my mistake. I should have mentioned that I had this
bug with mixed values and nulls. That's why I used an initilizer list. I
simply reduced the problem to the most simple exemple I could, as Miguel
asked me.

My original code is in fact a static 2D array with quite a few elements that
I create inside a static constructor. I use it to implement an object
factory pattern. There are a few nulls because the behavior of the factory
is not defined for all values.

Hope this helps,
Etienne Boucher




More information about the Mono-devel-list mailing list