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;
}