2 using System
.Collections
;
3 using System
.Collections
.Specialized
;
5 public class List
: IEnumerable
{
15 public void Add (int value)
17 items
[pos
++] = value;
20 public MyEnumerator
GetEnumerator ()
22 return new MyEnumerator(this);
25 IEnumerator IEnumerable
.GetEnumerator ()
27 return GetEnumerator ();
30 public struct MyEnumerator
: IEnumerator
{
35 public MyEnumerator (List l
)
41 public object Current
{
47 public bool MoveNext()
59 public class UberList
: List
{
60 public UberList (int i
) : base (i
)
64 public static int Main(string[] args
)
66 return One () && Two () && Three () ? 0 : 1;
72 List l
= new List (1);
83 List l
= new UberList (1);
94 UberList l
= new UberList (1);