Skip to content

Instantly share code, notes, and snippets.

@pedrolamas
Created July 4, 2014 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrolamas/62310da4282ebffa52ad to your computer and use it in GitHub Desktop.
Save pedrolamas/62310da4282ebffa52ad to your computer and use it in GitHub Desktop.
Basic app to test and compare the generated IL
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