[Solved] Invoke Delegate With Right Type [closed]
Two options to consider: Use dynamic typing to call a generic method which will return you a Func<object, object> which you can use later by wrapping up an expression-tree-compiled delegate: public Func<Object, Object> CreateFunc(object sampleValue) { dynamic dynamicValue = sampleValue; return CreateFuncImpl(dynamicValue); // Dynamic type inference } private Func<Object, Object> CreateFuncImpl<T>(T sampleValue) { // You … Read more