Closed
Description
var lambda = Expression.Lambda(Expression.MakeUnary(ExpressionType.Convert,
Expression.Default(typeof(object)), typeof(bool), typeof(Convert).GetMethod("IsDBNull")));
Console.WriteLine(lambda.ToReadableString());
I get () => bool.IsDBNull(null)
, but a method call translation would work just fine.
I know it's weird, but I get a similar expression for a VB "cast" (CInt
), which is, in fact, a method call to some VB-runtime function.