Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

38 lines
483 B
C#

using System;
interface IHello<T>
{
void Print (T t);
}
interface Foo
{
IHello<U> Test<U> ();
}
class Hello<T> : IHello<T>, Foo
{
public void Print (T t)
{
Console.WriteLine ("Hello: {0}", t);
}
public IHello<U> Test<U> ()
{
return new Hello<U> ();
}
}
class X
{
public static void Main ()
{
Hello<int> hello = new Hello<int> ();
hello.Print (5);
hello.Test<float> ().Print (3.14F);
IHello<string> foo = hello.Test<string> ();
foo.Print ("World");
}
}