WhileActivity Class
Runs a child activity iteratively as long as a certain condition is true.
Assembly: System.Workflow.Activities (in System.Workflow.Activities.dll)
The WhileActivity is a CompositeActivity, meaning the WhileActivity can contain other activities.
Before each iteration, the Condition property is evaluated. If the Condition property evaluates to false, the WhileActivity immediately finishes.
The following code example demonstrates how to create a new instance of the WhileActivity class and add the ParallelActivity class to the WhileActivity class. This code example is part of the WhileAndParallel SDK Sample from the WhileAndParallelWorkflow.Designer.cs file. For more information, see Using While and Parallel.
System.Workflow.ComponentModel.DependencyObject
System.Workflow.ComponentModel.Activity
System.Workflow.ComponentModel.CompositeActivity
System.Workflow.Activities.WhileActivity
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.