September 2010
Intermediate to advanced
272 pages
5h 16m
English
We can use Variable temporarily to store a value when a WF program is running. In this task, we will create a WF program that prints five numbers to the console in a loop. We will use the NumberCounter variable
as a number counter.
Create a new Workflow Console Application under the Chapter01 solution and name the project as UseVariable.
Add a Sequence activity, click the Sequence activity, create an Int32 NumberCounter variable, and set its Scope to Sequence. Then, author the workflow as shown in the following screenshot. In the second Assign activity type NumberCounter=NumberCounter+1.
Set UseVariable
as Startup project. Press Ctrl+F5 to build and ...