I start a new task using this:
Task.Factory.Startnew(myTask());
Hi Kalel,
the StartNew-Method has an overload that takes a CancellationToken as a second paramter. This is used to cancel tasks. But of course in the Task itself you need to check if it was cancelled, and then you can stop your work.
Find more about cancelling tasks here: http://msdn.microsoft.com/en-US/library/vstudio/dd997396.aspx
Thomas Claudius Huber "If you can´t make your app run faster, make it at least look & feel extremly fast" twitter: @thomasclaudiush homepage: www.thomasclaudiushuber.com author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook