Runtime creation of generic Func

后端 未结 4 792
野趣味
野趣味 2020-12-29 07:32

I need to implement the method:

object GetFactory(Type type);

This method needs to return a Func where typeparam \'T\' is the \

4条回答
  •  伪装坚强ぢ
    2020-12-29 08:33

    you could create Expression objects instead of a func, and compile() the expression to get a Func delegate.

提交回复
热议问题