CoercionOperatorNotDefined() static private method

InvalidOperationException with message like "No coercion operator is defined between types '{0}' and '{1}'."
static private CoercionOperatorNotDefined ( object p0, object p1 ) : Exception
p0 object
p1 object
return System.Exception
Esempio n. 1
0
        //CONFORMING
        private static UnaryExpression GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType)
        {
            UnaryExpression u = GetUserDefinedCoercion(coercionType, expression, convertToType);

            if (u != null)
            {
                return(u);
            }
            throw Error.CoercionOperatorNotDefined(expression.Type, convertToType);
        }