Skip to content

Instantly share code, notes, and snippets.

@SLaks
Created January 7, 2015 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SLaks/7b3165779a1d2d8977fe to your computer and use it in GitHub Desktop.
Save SLaks/7b3165779a1d2d8977fe to your computer and use it in GitHub Desktop.
MoveNext: True
MoveNext: False
MoveNext: True
MoveNext: False
static IEnumerator e;
static void Main() {
e = M();
Console.WriteLine("MoveNext: " + e.MoveNext());
Console.WriteLine("MoveNext: " + e.MoveNext());
Console.WriteLine("MoveNext: " + e.MoveNext());
}
static IEnumerator M() {
yield return 3;
Console.WriteLine("MoveNext: " + e.MoveNext());
yield return 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment