hello all ,
i was asked to convert a c++ sourcecode into its c# counter part , but i have no idea how i should go about this particular snippet of code.
i would be very thankful if anyone assists me in this problem .
the c++ snippet of code is this :
Code:
typedef double (*FunctionCallback)(double sol[D]);
FunctionCallback function = &sphere;
and this is sphere function , already converted to c#
Code:
static double sphere(double[] sol)
{
int j;
double top=0;
for(j=0;j<sol.Length;j++)
{
top=top+sol[j]*sol[j];
}
return top;
}
Thankyou in advance.