As input to another program I am using I need to input a delegate of the form:
Func<double, double, double>.
I want the function to be sent in to be
F(a,b)=a+b*c+d
where c
and d
are known constants known at runtime.
So what I need is some method which takes the values c and d, and then gives me a function F(a,b)
. What I think I need to do is to first create the method:
double der(double a, double b, double c, double d)
{
return a + b * c + d;
}
And from this method I have to do something with delegates in order to get my function. Do you see how to solve this problem?
Func<double,double,double>
does not describe a function that takes 3double
as parameters, but rather a function that takes 2double
and returns adouble
– Swen