2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-205.cs
blobf4bcaa23e3e9aaa4b6364f021e5ef20f50fd7bde
1 using System;
2 using System.Reflection;
4 public class Foo<S>
5 { }
7 public struct Bar<T>
8 { }
10 public class Test<U>
12 public static void Func (U u)
14 Console.WriteLine (u);
18 class X
20 static void Test (Type t, object arg)
22 MethodInfo mi = t.GetMethod ("Func");
23 mi.Invoke (null, new object[] { arg });
26 static void Main ()
28 Test (typeof (Test<Foo<int>>), new Foo<int> ());
29 Test (typeof (Test<Bar<int>>), new Bar<int> ());
30 Test (typeof (Test<Bar<string>>), new Bar<string> ());
31 Test (typeof (Test<Foo<DateTime>>), new Foo<DateTime> ());
32 Test (typeof (Test<DateTime>), DateTime.Now);
33 Test (typeof (Test<string>), "Hello");