❔ ✅ Rolling back list state after exception while adding elements to it
In the following sharplab demo, I add elements to a list inside a try-catch block, and attempt to reset the list to its original state when an exception occurs. However, the state saved before adding is somehow also updated.
I feel like I'm missing something fundamental about deferred execution or try-catch blocks...