Jan 23, 2026
Post comments count15
Post likes count4
C++ has scope_exit for running code at scope exit. C# says “We have scope_exit at home.”
You can wrap it in an IDisposable.