private bool Equals(CaseExpression other) => (Operand == null ? other.Operand == null : Operand.Equals(other.Operand)) && WhenClauses.SequenceEqual(other.WhenClauses, EqualityComparer <CaseWhenClause> .Default) && (ElseResult == null ? other.ElseResult == null : ElseResult.Equals(other.ElseResult));
/// <summary> /// Gets a hash code for the current object. /// </summary> /// <returns> The hash code. </returns> public override int GetHashCode() { var hashCode = Operand?.GetHashCode() ?? 0; hashCode = WhenClauses.Aggregate(hashCode, (current, value) => (current * 397) ^ value.GetHashCode()); hashCode = (hashCode * 397) ^ (ElseResult?.GetHashCode() ?? 0); return(hashCode); }