The answers that say that this is a deferred execution problem are wrong. It is an operator precedence problem.
Get rid of all that completely irrelevant and impossible-to-read code in there. It is all red herring. The relevant repro is:
decimal? d1 = 11.31m;
decimal? d2 = 11.28m;
decimal test1 = d1 ?? 0m;
decimal test2 = d2 ?? 0m;
decimal test3 = test1 + test2;
decimal test4 = d1 ?? 0m + d2 ?? 0m;
What is the meaning of the final line? Does it mean the same thing as the line before it?
No, it does not. The addition operator is higher precedence than the null coalescing operator, so this is
decimal test4 = d1 ?? (0m + d2) ?? 0m;
The code you wrote means "produce the value of d1 if d1 is not null. If d1 is null and 0m + d2 is not null then produce the value of 0m + d2. If 0m + d2 is null then produce the value 0m."
(You might not have known that the ?? operator has this pleasant chaining property. In general, a ?? b ?? c ?? d ?? e
gives you the first non-null value of a, b, c or d, and e if they are otherwise all null. You can make the chain as long as you like. It's quite an elegant little operator.)
Since d1 is not null, we produce its value and test4 is assigned the value of d1.
You probably meant to say:
decimal test4 = (d1 ?? 0m) + (d2 ?? 0m);
If you mean "d1 or d2 could be null, and if either is, then treat the null one as zero". So 12 + 2 is 14, 12 + null is 12, null + null is 0
If you mean "either d1 and d2 could be null, and if either is null then I want zero", that's
decimal test4 = (d1 + d2) ?? 0m;
So 12 + 2 is 14, 12 + null is 0, null + null is 0
I note that if you had formatted your code so that the relevant text was on the screen, you probably wouldn't have gotten five or so incorrect answers posted first. Try to format your code so that all of it is on the screen; you'll get better answers if you do.