Is even
using System.Collections.Generic; using System.Linq; using System; public static class Utilities { public static bool IsEven(this int value) { return (value & 1) == 0; } public static bool IsOdd(this int value) { return (value & 1) == 1; } public static bool IsEven(this long value) { return (value & 1) == 0; } public static bool IsOdd(this long value) { return (value & 1) == 1; } }