Trace the TrainingArea property to see the getter, calculation, and setter as separate events. The setter can reject a value even when the assignment statement completes normally.
Use the complete validated TrainingArea definition below.
| Moment | Backing field | Relevant value |
|---|---|---|
| Getter before arithmetic | 20.0 | Getter returns 20.0 |
| Setter condition before assignment | 20.0 | value is 20.5 |
| After accepted assignment | 20.5 | Stored state is updated |
If paused on the assignment, the new value has not necessarily been stored yet. Step over before claiming that it has changed. Inspect the backing field directly in Locals when possible; inspecting a property in debugger tools can itself evaluate a getter.
From a fresh area, call IncreaseTemperature ten times to reach 25.0. On the next call, the setter sees 25.5. The condition is false, its assignment is skipped, and the field stays 25.0.