I\'m refactoring some code.
Right now there are quite a few places with functions like this:
string error;
if (a) {
error = f1(a, long, parameter,
No, basically, without making it less efficient. If there is a return value, you can use:
var result = cond ? methodA(a,b,c,d) : methodB(a,b,c,d);
but that is about it.
Well, you can create a pair of delegates from the method group, but that adds overhead for no good reason. I won't endorse it.