I trying to see compiler's code for this little sample:
static void Main()
{
int i = 0;
AddToI(5);
AddToI(10);
Console.WriteLine(i);
void AddToI(int amount) => i += amount;
}
I am using ILSpy and it is showing me code almost identical to the original. But I expected compiler to add some class or structure?
Maybe I can tune ILSpy to show me more details?