I am creating an int array by using the below syntax
int start = Math.Min(Convert.ToInt32(FirstNum), Convert.ToInt32(SecondNum));
int end = Math.Max(Convert.ToInt32(FirstNum), Convert.ToInt32(SecondNum));
end = end + 1;
int[] ang = Enumerable.Range(start, end - start).ToArray();
foreach (int a in ang) {int first = a.Min(); }
However I have a compile error of
'int' does not contain a definition for 'Min' and the best extension method overload 'Enumerable.Min(IEnumerable)' requires a receiver of type 'IEnumerable'
What is the proper way to get the MIN() value from the array of ints?
int first = ang.Min();and get rid of the loop.ang[0]is the minimum element.