Perform some cleanup when the form window is closed

How to run some cleanup code when a user closes a window?

+3
source share
2 answers

Subscribe to the FormClosing event (if you use WinForms, not WPF).

+8
source

You can connect to an event Closingin your window (if you are using WPF).

+4
source

Source: https://habr.com/ru/post/1771296/


All Articles