 | TaskLastTaskResult Property |
Gets the results that were returned the last time the registered task was run.
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic int LastTaskResult { get; }
Public ReadOnly Property LastTaskResult As Integer
Get
public:
property int LastTaskResult {
int get ();
}
Request Example
View SourceProperty Value
Type:
Int32
RemarksThe value returned is the last exit code of the last program run via an
ExecAction.
Examples
if (TaskService.Instance.GetTask("MyTask").LastTaskResult != 0)
MessageBox.Show("This program has an error.");
See Also