I have a Console application Hosted in Task Scheduler. while my job is running, in some scenarios i will store some data in static lists and DataTables. and later i will log those data in single shot.
There is a scenario where technical team will stop the service manually before completion, in this case am missing to log the data that has captured in static list.
Is there any way we can log while the user stops the Console application manually.