Sorry - I see now that this won't work for the built-in functions.
For the built-in functions you need to use the right XlCall.xlfXXX
function, e.g.
return (double)XlCall.Excel(XlCall.xlfAverage, 18, 12);
The XlCall.xlUDF (not xlfUDF as I wrote before) option is to call user-
defined functions, like those registered by Excel-DNA or VBA.
-Govert