public override bool Equals(object obj)
{
var other = obj as CompoundValue;
if (other == null) return false;
if (other.Values.Count() != Values.Count()) return false;
for (var i = 0; i < Values.Count(); i++)
{
if (!Values.ElementAt(i).Equals(other.Values.ElementAt(i))) return false;
}
return true;
}