Is there a way to use a method as a parameter for another. For instance, a method that returns 2f(3) for a given function f. I understand that as is, my code is incorrect: I'm trying to convey the idea that I want.
static double twofof3(double f(double x))
{
return 2*f(3);
}
static double f(double x)
{
return x * x;
}
The twofof3 method is currently pointless because it could be achieved with just the f method, but it's more the concept I am interested in.