DelayActivity.TimeoutDuration Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets and sets the duration of the delay in the workflow.

Namespace:   System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

public TimeSpan TimeoutDuration { get; set; }

Property Value

Type: System.TimeSpan

A TimeSpan that indicates the length of the delay in the workflow.

The time period set in this property determines the time the workflow will sit idle before the workflow proceeds to the next activity.

The following code example demonstrates how to set the value of the TimeoutDuration property to 3 seconds. This code assumes that delay2 is of type DelayActivity. This code example is part of the SimpleStateMachineWorkflow SDK Sample from the StateMachineWorkflow.cs file. For more information, see Simple State Machine.

this.state1Delay.Name = "state1Delay";
this.state1Delay.TimeoutDuration = System.TimeSpan.Parse("00:00:02");

.NET Framework
Available since 3.0
Return to top