2 // Important test for the runtime: check whether we're correctly
3 // creating the vtable for nested types.
26 public IMonkey
<U
> GetTheMonkey
<U
> (U u
)
28 return new Monkey
<T
,U
> (this, u
);
31 public class Monkey
<V
,W
> : IMonkey
<W
>
33 public readonly Zoo
<V
> Zoo
;
34 public readonly W Data
;
36 public Monkey (Zoo
<V
> zoo
, W data
)
44 Console
.WriteLine ("Monkey {0} from {1} jumping!", Data
, Zoo
.Name
);
52 public static void Main ()
54 Zoo
<string> zoo
= new Zoo
<string> ("Boston");
55 IMonkey
<float> monkey
= zoo
.GetTheMonkey
<float> (3.14F
);