src/NetStandard/Linq/Expressions/Expressions/src/ExpressionEqualityComparer.cs
/// <summary>
/// Checks for equality. If no null is involved the parameters are 
/// tried to be casted to <see cref="Expression"/> and checked against
/// <see cref="Equals(Expression, Expression)"/>.
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns>True if both objects are equal.</returns>
Checks for equality. If no null is involved the parameters are
tried to be casted to  and checked against
.
Checks for equality . If no null is involved the parameters are tried to be casted to and checked against .
public virtual bool CastBeforeEquals(object x, object y) {
            if (x is null && y is null) {
                return true;
            } else if (x is null || y is null) {
                return false;
            }
            if (x is Expression expression && y is Expression otherExpression) {
                return Equals(expression, otherExpression);
            }
            return false;
        }
public virtual bool CastBeforeEquals ( object x , object y ) { if ( x is null && y is null ) { return true ; } else if ( x is null || y is null ) { return false ; } if ( x is Expression expression && y is Expression otherExpression ) { return Equals ( expression , otherExpression ) ; } return false ; }
Checks for equality.
Checks for equality .
True if both objects are equal.
True if both objects are equal .
x
object
None
y
object
None