1 public interface INode
<T
>
9 public readonly Foo
<T
> TheFoo
;
14 this.TheFoo
= new Foo
<T
> (t
);
17 public INode
<T
> GetNode ()
19 return new Node (this);
22 public Foo
<T
> GetFoo (T t
)
24 return new Foo
<T
> (t
);
27 public Bar
<T
> GetBar (T t
)
29 return new Bar
<T
> (t
);
32 protected class Node
: INode
<T
>
34 public readonly Stack
<T
> Stack
;
36 public Node (Stack
<T
> stack
)
41 public void Hello (T t
)
48 public readonly T Data
;
50 public Bar
<T
> GetBar ()
52 return new Bar
<T
> (Data
);
63 public readonly U Data
;
70 public Foo
<T
> GetFoo (Stack
<T
> stack
)
77 public readonly V Data
;
79 public Foo
<T
> GetFoo (Stack
<T
> stack
)
81 return new Foo
<T
> (stack
.TheData
);
84 public Bar
<V
> GetBar ()
86 return new Bar
<V
> (Data
);
98 Stack
<T
>.Foo
<T
> foo1
= GetFoo (TheData
);
99 Foo
<T
> foo2
= GetFoo (TheData
);
101 Stack
<long>.Foo
<T
> foo3
= new Stack
<long>.Foo
<T
> (TheData
);
102 Stack
<long>.Foo
<float> foo4
= new Stack
<long>.Foo
<float> (3.14F
);
104 Foo
<double> foo5
= new Foo
<double> (3.14);
112 public static Nested
<T
> Foo ()
117 public class Nested
<X
>
125 public static int Main ()
127 Stack
<int> stack
= new Stack
<int> (1);
128 INode
<int> node
= stack
.GetNode ();
129 Stack
<int>.Foo
<int> foo
= stack
.GetFoo (7);
130 Stack
<int>.Bar
<int> bar
= stack
.GetBar (8);
132 A
<bool>.Test
<string>.Nested
<string> v
= A
<bool>.Test
<string>.Foo ();