2 using System.Reflection;
6 public struct SimpleStruct {
11 static void Test2 () {
12 Console.WriteLine ("Test2 called");
15 public static SimpleStruct Test1 (SimpleStruct ss) {
16 Console.WriteLine ("Test1 called " + ss.a + " " + ss.b);
17 SimpleStruct res = new SimpleStruct ();
24 Type t = typeof (Test);
26 MethodInfo m2 = t.GetMethod ("Test2");
30 MethodInfo m1 = t.GetMethod ("Test1");
34 object [] args = new object [1];
35 SimpleStruct ss = new SimpleStruct ();
40 SimpleStruct res = (SimpleStruct)m1.Invoke (null, args);