Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
internal class Program
{
// Methods
private static void Main(string[] args)
{
foreach (string f in Turtles())
{
Console.WriteLine(f);
}
}
private static IEnumerable<string> Turtles()
{
return new <Turtles>d__0(-2);
}
// Nested Types
[CompilerGenerated]
private sealed class <Turtles>d__0 : IEnumerable<string>, IEnumerable, IEnumerator<string>, IEnumerator, IDisposable
{
// Fields
private int <>1__state;
private string <>2__current;
private int <>l__initialThreadId;
public int <i>5__1;
// Methods
[DebuggerHidden]
public <Turtles>d__0(int <>1__state)
{
this.<>1__state = <>1__state;
this.<>l__initialThreadId = Thread.CurrentThread.ManagedThreadId;
}
private bool MoveNext()
{
switch (this.<>1__state)
{
case 0:
this.<>1__state = -1;
this.<>2__current = "turtles";
this.<>1__state = 1;
return true;
case 1:
this.<>1__state = -1;
this.<i>5__1 = 0;
while (this.<i>5__1 < 10)
{
this.<>2__current = "are super cool " + this.<i>5__1;
this.<>1__state = 2;
return true;
Label_0078:
this.<>1__state = -1;
this.<i>5__1++;
}
break;
case 2:
goto Label_0078;
}
return false;
}
[DebuggerHidden]
IEnumerator<string> IEnumerable<string>.GetEnumerator()
{
if ((Thread.CurrentThread.ManagedThreadId == this.<>l__initialThreadId) && (this.<>1__state == -2))
{
this.<>1__state = 0;
return this;
}
return new Program.<Turtles>d__0(0);
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return this.System.Collections.Generic.IEnumerable<System.String>.GetEnumerator();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
void IDisposable.Dispose()
{
}
// Properties
string IEnumerator<string>.Current
{
[DebuggerHidden]
get
{
return this.<>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return this.<>2__current;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.