I need to add numerous variables of type nullable int. I used the null coalescing operator to get it down to one variable per line, but I have a feeling there is a more conc
List> numbers = new List>(); numbers.Add(sum1); numbers.Add(sum2); numbers.Add(sum3); int total = 0; numbers.ForEach(n => total += n ?? 0);
this way you can have as many values as you want.