I am working on a FastReport that uses C#. I am trying to get the maximum value of 10 variables (heart rates).
I have the following code written:
public static int GetMaxHeartRate(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j)
{
int result = 0;
result = Math.Max(a, b, c, d, e, f, g, h, i, j);
return result;
}
I am getting this error: "Error CS1501: No overload for method 'Max' takes 10 arguments". I know how to use the Math.Max for 3 variables, but can't figure it out for 10 variables.