I have an array of five numbers and an array of 2 numbers. How would I find out the largest number among these 7 numbers? Is there a method that can make things easier?
int[] array1 = { 0, 1, 5, 2, 8 };
int[] array2 = { 9, 4 };
int max = array1.Concat(array2).Max();
// max == 9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With