Emitting Multi Dimentional Arrays

time to read 2 min | 275 words

Given the following type defination:

public virtual void Do2(int[,] args) 

This is what the C# compiler will output:

.method public hidebysig newslot virtual instance void Do2(int32[0...,0...] args) cil managed

Notice the 0...,0... ? This means that this is a two dimentional array whose indexes starts with 0. The problem is that there is simply no way that I could find to generate an overload to this method from Reflection.Emit. Even when I pass it the correct Type (hard coded in C# to use int[,], for instnace), it still generates the following:

.method public hidebysig virtual instance void Do2(int32[,] args) cil managed

I am currently trying to read Boo's source code, but this is really looking for a needle in a haystack, and as far as I can see, Boo doesn't handle this at all.