C#C
C#11mo ago
Faker

✅ Can someone explain how this ternary expression works

c#
total -= TotalMeetsMinimum() ? 5.00 : 0.00;


Given that TotalMeetsMinimum returns a boolean.

I don't understand because of the -= symbol, like here, it's like we are doing total = total - TotalMeetsMinimum() ? 5.00 : 0.00; ?
If no, then how do we read that expression please
Was this page helpful?