Created
July 4, 2014 10:15
-
-
Save pedrolamas/62310da4282ebffa52ad to your computer and use it in GitHub Desktop.
Basic app to test and compare the generated IL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
DoIt1(); | |
DoIt2(); | |
} | |
private static void DoIt1() | |
{ | |
for (int i = 0; i < 100; i++) | |
{ | |
var x = i * 2; | |
Console.WriteLine(x); | |
} | |
} | |
private static void DoIt2() | |
{ | |
int x; | |
for (int i = 0; i < 100; i++) | |
{ | |
x = i * 2; | |
Console.WriteLine(x); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment