[Mono-bugs] [Bug 80567][Nor] Changed - Arrays don't have the Set and Get methods that are available (from IL) in Microsoft's .NET

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jan 21 12:31:53 EST 2007

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 michaelgwelch at gmail.com.


--- shadow/80567	2007-01-21 12:09:26.000000000 -0500
+++ shadow/80567.tmp.26911	2007-01-21 12:31:53.000000000 -0500
@@ -61,6 +61,28 @@
 element with the correct type. GetValue returns an object.
 If you run the program above with BindingFlags set to include
 NonPublic methods then you'll see the methods of IList included. But
 on .NET those methods throw an exception if you call them on a
 multi-dimensional array.
+------- Additional Comments From michaelgwelch at gmail.com  2007-01-21 12:31 -------
+Well I've compiled the following program using gmcs
+using System;
+class Program
+    public static void Main()
+    {
+        string[,] strings = new string[3,4];
+        string ss = strings[1,2];
+    }
+and then disassembled it using monodis and see the following line in
+the IL:
+        IL_000b:  call instance string string[,]::Get(int32, int32)
+So it appears the Get method is indeed part of the class string[,].
+However, any attempt I make to use reflection to get a MethodInfo
+class for the Get method it is not found.

More information about the mono-bugs mailing list