Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-057.cs
1 using System;
2
3 interface IHello<T>
4 {
5         void Print (T t);
6 }
7
8 interface Foo
9 {
10         IHello<U> Test<U> ();
11 }
12
13 class Hello<T> : IHello<T>, Foo
14 {
15         public void Print (T t)
16         {
17                 Console.WriteLine ("Hello: {0}", t);
18         }
19
20         public IHello<U> Test<U> ()
21         {
22                 return new Hello<U> ();
23         }
24 }
25
26 class X
27 {
28         public static void Main ()
29         {
30                 Hello<int> hello = new Hello<int> ();
31                 hello.Print (5);
32                 hello.Test<float> ().Print (3.14F);
33
34                 IHello<string> foo = hello.Test<string> ();
35                 foo.Print ("World");
36         }
37 }