Check out example codes for "see max value in array c#". It will help you in understanding the concepts better.
Code Example 1
using System.Linq;
int maxValue = anArray.Max();
Code Example 2
int maxValue = anArray.Max();
int maxIndex = anArray.ToList().IndexOf(maxValue);
Learn ReactJs, React Native from akashmittal.com