I've written this app:
using System.Collections.Generic;
using System;
namespace Test
{
class Program
{
static void Main(string[] args)
{
var myClass = new MyClass();
foreach (var item in myClass.CountFrom(1, 4))
{
Console.WriteLine(item);
}
Console.Read();
}
}
public class MyClass
{
public IEnumerable<int> CountFrom(int start, int limit)
{
for (int i = start; i <= limit; i++)
{
yield return i;
}
}
}
}
The compiler generated code can be found here.
What is the easiest way to convert the compiler generated C# code into code that I can copy/paste into VS and debug? I'd prefer to not have to do replace all for the non C# names.
The same question has been asked before but with no answer.