先看 if else 一段代碼
using System;class Program { private static void Main() { int i = 0; if (i == 0) i = -1; else i = -2; Console.WriteLine(i); } }
輸出 -1
用IL DASM ("C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\ildasm.exe"vs2015 up3,項(xiàng)目框架.NET Framework 4.5.2)打開
.method private hidebysig static void Main(