Animatroller.Framework.Expander.ByteArrayRocks.IsMatch C# (CSharp) Method

IsMatch() static private method

static private IsMatch ( byte array, int position, byte candidate, int size ) : bool
array byte
position int
candidate byte
size int
return bool
        static bool IsMatch(byte[] array, int position, byte[] candidate, int size)
        {
            if (candidate.Length > (size - position))
                return false;

            for (int i = 0; i < candidate.Length; i++)
                if (array[position + i] != candidate[i])
                    return false;

            return true;
        }