(click on headings for code snippets)

Arrays in C#

Write a function kthLargest(arr, k), that takes an integer array and integer k, 
 that returns the k-th largest element in the array.

public int kthLargest(int[] arr, int k)
  return = arr[k];
 public ActionResult Arrays(int[] inArr, int k)
  //find the highest value in the array
  //  ret = arr.Max();
  for (int i = 0; i < arr.Length; i++)
	if ( inArr[i] > ret) 
	  ret = inArr[i];

  return View();