This
if (leftHand == rightHand)
change to
if (object.ReferenceEquals(leftHand, rightHand))
You probably redefined the ==
operator to call Equals
.
And I hope you don't have an implicit operator that from string
creates StringType
, because otherwise
if ((leftHand == "0") || (rightHand == "0"))
will probably call itself for the same reason.
Probably
if ((leftHand.myValue == "0") || (rightHand.myValue == "0"))
would be better.