Get maximum value in an array of integers
csharp
/// <summary>
/// Get the maximum value in an array of integers
/// </summary>
/// <param name="numbers">Array of numbers (integers)</param>
/// <returns>Highest number in array</returns>
public static int Maximum(int[] numbers)
{
  ValidateNumbers(numbers);

  int max = numbers[0];

  foreach (int value in numbers)
  {
    if (value > max) { max = value; }
  }

  return max;
}