-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Microsoft Windows Workflow Foundation 4.0 Cookbook
By :

ParallelForEach<T>
is actually a special ForEach<T>
activity. The difference between ParallelForEach<T>
and ForEach<T>
is that ParallelForEach<T>
's embedded statements are scheduled and run asynchronously. ParallelForEach<T>
itself is akin to a Parallel activity for its child activities. Let's create a sample to see how it works.
Create a workflow project:
Create a new Workflow Console Application under solution Chapter02
and name the project UsingParallelForEachActivity
.
Create a workflow:
Open Workflow1.xaml
and author a workflow as shown in the following screenshot:
Set the properties of both Delay activities:
Run it:
Set UsingParallelForEachActivity
as StartUp project. Press CTRL+F5 to build and run the workflow without debugging. We can refer the following screenshot:
We should find that the Delay activity in Seqence2 branch seems not to take effect at all. In fact, whenever...
Change the font size
Change margin width
Change background colour