using System.Diagnostics;
private static void Benchmark(Action act, int iterations)
Stopwatch sw = Stopwatch.StartNew();
for (int i = 0; i < iterations; i++)
Console.WriteLine((sw.ElapsedTicks).ToString());
public static void Main(string[] args)
var half = input >= 0 ? 0.5 : -0.5;
int result = (int)(input + half);
int result = (int)(Math.Round(input));
int result = (int)(Convert.ToInt32(input));