How to execute a non-blocking C # method at regular intervals?

I have a C # class. I need to run a copy of it at regular intervals, say 5 minutes. I need to execute this code every 5 minutes without blocking the main thread. I would also like to have a mechanism in which I can stop this process.

+5
source share
1 answer

Check out the class Timer.

+12
source

All Articles