a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
33 lines
343 B
C#
33 lines
343 B
C#
using System;
|
|
|
|
interface IFoo
|
|
{
|
|
MyList<U> Map<U> ();
|
|
}
|
|
|
|
class MyList<T>
|
|
{
|
|
public void Hello (T t)
|
|
{
|
|
Console.WriteLine (t);
|
|
}
|
|
}
|
|
|
|
class Foo : IFoo
|
|
{
|
|
public MyList<T> Map<T> ()
|
|
{
|
|
return new MyList<T> ();
|
|
}
|
|
}
|
|
|
|
class X
|
|
{
|
|
public static void Main ()
|
|
{
|
|
Foo foo = new Foo ();
|
|
MyList<int> list = foo.Map<int> ();
|
|
list.Hello (9);
|
|
}
|
|
}
|