System > System Assembly Interfaces > ITask > ITask.Cancel
Cancel;
Cancel();
The Cancel method cancels task execution.
See also:
ITask