How to modify type parameter of Expression>?

前端 未结 3 1260
青春惊慌失措
青春惊慌失措 2021-01-04 22:59

I have an instance of the following:

Expression>

I wish to convert it to an instance of the following

3条回答
  •  一整个雨季
    2021-01-04 23:50

    I only had a few minutes so I haven't thought on this deeply. Does this help?

    Expression> exp1 = (list => list.Count > 0);
    Expression> exp2 = (list => exp1.Compile()(list));
    Expression, bool>> exp3 = (list => exp1.Compile()(list));
    

    I kinda demonstrates what you want I think.

提交回复
热议问题