Skip to content

Custom conversion #117

Closed
Closed
@lbargaoanu

Description

@lbargaoanu
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugin-branchA feature or bug fix exists in code, and a release will follow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions