Cancelling a task |
A TelnetTask will continue to run until it has encountered it's specified end prompt. In certain conditions it is possible that the end prompt may never return. Typically this is due to an error returned by the shell when running the task that does not match your specified end prompt. In these cases you may need to cancel the current TelnetTask so as to continue your programs execution. To cancel a task invoke the Cancel method.
Example
[C#]
// Cancel a task
myTask.Cancel();
[Visual Basic]
' Cancel a task
myTask.Cancel()