Esempio n. 1
0
        public override bool Equals(object obj)
        {
            if (obj is CompoundExpression other)
            {
                if (object.ReferenceEquals(this, other))
                {
                    return(true);
                }

                if (!m_functor.Equals(other.m_functor))
                {
                    return(false);
                }
                int count = m_arguments.Count;
                for (int i = 0; i < count; ++i)
                {
                    if (!m_arguments[i].Equals(other.m_arguments[i]))
                    {
                        return(false);
                    }
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }