How can I pass in a func with a generic type parameter?
You cannot have instances of generic functions or actions – all type parameters are defined upfront and cannot be redefined by the caller. An easy way would be to avoid polymorphism altogether by relying on down-casting: public void SomeUtility(Func<Type, object, object> converter) { var myType = (MyType)converter(typeof(MyType), “foo”); } If you want type safety, you … Read more