How do I add two lists in Linq so addedList[x] = listOne[x] + listTwo[x]?
- by Audie
I want to add two lists of a numeric type such that
addedList[x] = listOne[x] + listTwo[x]
The output of the list needs to be a Generic.IEnumerable that I can use in future linq queries.
While I was able to do it using the code below, I can't help but feel like there must be a better way. Any ideas?
List<int> firstList = new…