I have a fairly simple {I hope} question - I use Task.Factory.StartNew(() to start a task that runs in a loop indefinitely. However, I want to set up an event handler that ends/stops that method when a specified event occurs. How would I do that?
C# newbie, learning on the go. I will probably ask a lot of followup questions about any answers already given, so fair warning and all.