a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
25 lines
558 B
C#
25 lines
558 B
C#
using System;
|
|
using System.Collections;
|
|
|
|
class Program
|
|
{
|
|
static public IEnumerable Empty {
|
|
get {
|
|
object [] os = new object [] { };
|
|
foreach (object o in os) {
|
|
yield return o;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void Main()
|
|
{
|
|
IEnumerator enumerator = Empty.GetEnumerator();
|
|
if (enumerator.Current == null)
|
|
Console.WriteLine("Successful");
|
|
enumerator.MoveNext();
|
|
if (enumerator.Current == null)
|
|
Console.WriteLine("Successful");
|
|
}
|
|
}
|