Saturday, December 29, 2007

C#: Find position of the max integer in an array

public int GetMaxIndexInIntegerArray(int[] thearray)
{
int max = 0;
for (int i = 1; i <> thearray[max])
{
max = i;
}
}
return max;
}

No comments:

Post a Comment

Please use your common sense before making a comment, and I truly appreciate your constructive criticisms.