public override int GetHashCode() { unchecked { int result = tag.GetHashCode(); if (tag == TypeTag.A) { result = (result * 397) ^ (AValue != null ? AValue.GetHashCode() : 0); } else if (tag == TypeTag.B) { result = (result * 397) ^ (BValue != null ? BValue.GetHashCode() : 0); } return(result); } }
public override int GetHashCode() { return(TypeTag.GetHashCode() ^ TypeId.GetHashCode()); }