blob: ae26be929764b0b869530f1aec4524888dca3edc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Compiler options: /t:library
using System;
using SCG = System.Collections.Generic;
namespace C5
{
public abstract class EnumerableBase<T> : SCG.IEnumerable<T>
{
public abstract SCG.IEnumerator<T> GetEnumerator ();
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
public class ArrayBase<T> : EnumerableBase<T>
{
public override SCG.IEnumerator<T> GetEnumerator ()
{
yield break;
}
}
public class ArrayList<T> : ArrayBase<T>
{
public override SCG.IEnumerator<T> GetEnumerator ()
{
return base.GetEnumerator ();
}
}
}
|