// Test the return value from ConstructorInfo.Invoke when a precreated
// valuetype is used.
ConstructorInfo ci = typeof (SimpleStruct).GetConstructor (new Type [] { typeof (bool) });
- SimpleStruct res2 = (SimpleStruct)ci.Invoke (ss, new object [] { false });
+ ci.Invoke (ss, new object [] { false });
+
+ // Test invoking of the array Get/Set methods
+ string[,] arr = new string [10, 10];
+
+ arr.GetType ().GetMethod ("Set").Invoke (arr, new object [] { 1, 1, "FOO" });
+ string s = (string)arr.GetType ().GetMethod ("Get").Invoke (arr, new object [] { 1, 1 });
+ if (s != "FOO")
+ return 3;
+
+ // Test the sharing of runtime invoke wrappers for string ctors
+ typeof (string).GetConstructor (new Type [] { typeof (char[]) }).Invoke (null, new object [] { new char [] { 'a', 'b', 'c' } });
+
+ typeof (Assembly).GetMethod ("GetType", new Type [] { typeof (string), }).Invoke (typeof (int).Assembly, new object [] { "A" });
return 0;
}