Also, I need to sort this ArrayList. How can I do that?
myCode is below. It doesn't give the right Max value for example when I have like three numbers in my arraylist and all are negative. The max value is being returned is Zero.
ArrayList Values = new ArrayList();
double Max = 0; double Min =0; double temp = 0;
foreach (double x in Values)
{
temp = x;
if(Max
Max = temp;
}
if(Min > temp)
{
Min = temp;
}
}
VulpesPosted Jul 9, 2014, 5:47 AM
The output is:
Guest UserPosted Jul 9, 2014, 5:38 AM