BitsetsNET.UncompressedBitArray.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }

            UncompressedBitArray compare = (UncompressedBitArray)obj;
            bool equalLength = (this.Length == compare.Length);
            if (equalLength)
            {
                for (int i = 0; i < this.Length; i++)
                {
                    if (this.array.Get(i) != compare.array.Get(i))
                    {
                        equalLength = false;
                    }

                }
            }
            return equalLength;
        }