Decompile Iterator blocks

Moderators: Luke Jefferson, Greg.Tillman, Clive Tong

Decompile Iterator blocks

Postby matzeook » Fri Jan 13, 2012 5:18 pm

I just downloaded the 7.4.1.193 Reflector trial version and tried to decompile an test assembly including the IteratorSample Method from your web site.
http://www.reflector.net/vspro/

Code: Select all
public static IEnumerable<int>IteratorSample()
        {
            for (int i = 0; i < 10; i++)
            {
                yield return i;
            }
        }


Decompiling this code results in

[CompilerGenerated]
private sealed class <IteratorSample>d__0 : IEnumerable<int>, IEnumerable, IEnumerator<int>, IEnumerator, IDisposable
....
and all those
private int <>1__state
private int <>2__current;
private int <>l__initialThreadId;
public int <i>5__1;
...
members.

Is this a bug?
The LamdaExample and LinqSample were decompiled as they are in source code.
matzeook
 
Posts: 1
Joined: Fri Jan 13, 2012 1:37 pm

Return to .NET Reflector 7.0 Feedback

Who is online

Users browsing this forum: No registered users and 0 guests