In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
[mcs.git] / tests / gtest-128.cs
blob465ed95ceb01357407b3f4927d8a1355762d9c04
1 using System;
2 using System.Reflection;
4 namespace FLMID.Bugs.ParametersOne
6 public class Class<T>
8 public void Add(T x)
10 System.Console.WriteLine("OK");
13 public class Test
16 public static void Main(string [] args)
18 Class<string> instance = new Class<string>();
20 MethodInfo _method = null;
22 foreach(MethodInfo method in
23 typeof(Class<string>).GetMethods(BindingFlags.Instance | BindingFlags.Public))
25 if(method.Name.Equals("Add") && method.GetParameters().Length==1)
27 _method = method;
28 break;
31 _method.Invoke(instance , new object[]{"1"});