Converting between Func with different # of type args
问题 Are there built in methods for converting between the various types of Func delegates? That is, suppose you need a Func, but you have a Func (and you have the value that should be passed in for the T parameter). For example: static TREsult Foo<TResult>(Func<TResult> f) { // ... TResult result = f(); // ... return result; } static int MyFunc(int i) { return i; } void CallFoo() { Func<int> func = ConvertFunc(MyFunc, 1); // Does this family of methods exist? int j = Foo(func); } I've written my