Check out example codes for "max of array C#". It will help you in understanding the concepts better.

Code Example 1

int maxValue = anArray.Max();
int maxIndex = anArray.ToList().IndexOf(maxValue);

Learn ReactJs, React Native from akashmittal.com