[英]How to get ILSpy to show compiler generated code
I've written and built this app:我已经编写并构建了这个应用程序:
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;
}
}
}
}
When I view the code in ILSpy, based on the.exe in the bin/Debug folder, it doesn't show the state machine code I was hoping to see:当我在 ILSpy 中查看代码时,基于 bin/Debug 文件夹中的.exe,它没有显示我希望看到的 state 机器代码:
How can I get it to show the compiler generated code ?我怎样才能让它显示编译器生成的代码?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.