This has this:
int[] array1 = { 1, 3, 5, 7 }; List<int> list1 = new List<int>() { 1, 3, 5, 7 }; int sum1 = array1.Sum(); int sum2 = list1.Sum();
The last two variables each end up with the number sixteen in them.
No comments:
Post a Comment