79127550

Date: 2024-10-25 23:36:36
Score: 1
Natty:
Report link

Recently I'd use:

AppDomain.CurrentDomain.ProcessExit += OnProcessExit;

which registers a function like this:

private static void OnProcessExit(object? sender, EventArgs e) { //.... your code here }

and gets called properly. No .dll import. Probably a lot more multiplatform this way.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: AndrasLiptak