public static void Main()
var stopWatch = new System.Diagnostics.Stopwatch();
var tests = Enumerable.Range(1, 25000).Select(x => (uint)new Random().Next(0, int.MaxValue));
foreach (var test in tests)
Console.WriteLine("Duration: " + stopWatch.Elapsed);
protected static bool IsPalindromeA(uint x)
var characters = s.ToCharArray();
Array.Reverse(characters);
return s == new string(characters);
protected static bool IsPalindromeB(uint x)
var chars = x.ToString();
for (var i = 0; i < chars.Length / 2; i++)
if (chars[i] != chars[chars.Length - 1 - i])