Switch to compiler-tester
[mono.git] / mcs / tests / gtest-128.cs
1 using System;
2 using System.Reflection;
3
4 namespace FLMID.Bugs.ParametersOne
5 {
6         public class Class<T>
7         {
8                 public void Add(T x)
9                 {
10                         System.Console.WriteLine("OK");
11                 }
12         }
13         public class Test
14         {
15         
16                 public static void Main(string [] args)
17                 {
18                         Class<string> instance = new Class<string>();
19                         
20                         MethodInfo _method = null;
21                         
22                         foreach(MethodInfo method in
23 typeof(Class<string>).GetMethods(BindingFlags.Instance | BindingFlags.Public))
24                         {
25                                 if(method.Name.Equals("Add") && method.GetParameters().Length==1)
26                                 {
27                                         _method = method;
28                                         break;
29                                 }
30                         }
31                         _method.Invoke(instance , new object[]{"1"});
32                 }
33         }
34 }