If, like me, you shiver at the site of a While (True) loop, then you too must have thought long and hard about the best way to refactor it away. I\'ve seen several different im
Replace True with the condition you were going to use to break out of the loop.
In the case of a service or background thread, you might use:
volatile bool m_shutdown = false; void Run() { while (!m_shutdown) { ... } }