I recently saw some kind of production code:
if (Process.GetCurrentProcess().HasExited) { // do something }
It makes sense? Intuitively, if a process exits, code cannot be run in it.
If not, what would be a good way to say if the current process is ending?
If this could make any difference, the precedent for this was to avoid making statements such as objects that are not deleted in the process.
Asik
source share