//This code contains a function that does what the example function at the beginning of //this chapter hoped
//to do. It accepts an array of integers as a parameter and returns the highest number //in the array. The
//function definition is as follows:

static int MaxValue(int[] intArray)
{
int maxVal = intArray[0];
for (int i = 1; i < intArray.Length; i++)
{
if (intArray[i] > maxVal)
maxVal = intArray[i];
}
return maxVal;
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/70XNBXkyb7A/12945