BFSchema.BfsExpressionVariable.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (!(obj is BfsExpressionVariable))
                return false;

            BfsExpressionVariable other = obj as BfsExpressionVariable;
            if (this.NameHierarchy.Count != other.NameHierarchy.Count)
                return false;

            for (int i = 0; i < this.NameHierarchy.Count; i++)
                if (this.NameHierarchy[i].Name != other.NameHierarchy[i].Name ||
                    this.NameHierarchy[i].PrimitiveType.PrimitiveType != other.NameHierarchy[i].PrimitiveType.PrimitiveType)
                    return false;

                return true;
        }