static void Main(string[] args) { System.Collections.BitArray bitsarr = new System.Collections.BitArray(150); //Tests: bitsarr[0] = true; bitsarr[1] = true; bitsarr[2] = false; bitsarr[3] = true; bitsarr[50] = true; bitsarr[51] = true; bitsarr[52] = true; bitsarr[53] = false; bitsarr[54] = false; bool result = bitsarr.IsFound(new System.Collections.BitArray(new bool[] { true, true, false, true })); Console.WriteLine("Result: {0}, expected True", result); result = bitsarr.IsFound(new System.Collections.BitArray(new bool[] { true, true, true, true })); Console.WriteLine("Result: {0}, expected False", result); result = bitsarr.IsFound(new System.Collections.BitArray(new bool[] { true, true, true, false })); Console.WriteLine("Result: {0}, expected True", result); result = bitsarr.IsFound(new System.Collections.BitArray(new bool[] { false, true, true, true })); Console.WriteLine("Result: {0}, expected True", result); result = bitsarr.IsFound(new System.Collections.BitArray(new bool[] { false, true, true, true })); Console.WriteLine("Result: {0}, expected True", result); Console.ReadKey(); }