private static BinaryExpression GetUserDefinedBinaryOperatorOrThrow(ExpressionType binaryType, string name, Expression left, Expression right, bool liftToNull)
{
BinaryExpression b = GetUserDefinedBinaryOperator(binaryType, name, left, right, liftToNull);
if (b != null)
{
ParameterInfo[] pis = b.Method.GetParametersCached();
ValidateParamswithOperandsOrThrow(pis[0].ParameterType, left.Type, binaryType, name);
ValidateParamswithOperandsOrThrow(pis[1].ParameterType, right.Type, binaryType, name);
return b;
}
throw Error.BinaryOperatorNotDefined(binaryType, left.Type, right.Type);
}