This documentation is archived and is not being maintained.

DelayActivity.TimeoutDuration Property

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");

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0