Export (0) Print
Expand All

RangeEnumeration Activity

This sample demonstrates how to create a custom activity that iterates over a collection of numbers.The following table details the main files included in the sample.

 

File name Description

RangeEnumeration.cs

Defines a custom activity named RangeEnumeration that overrides the NativeActivity class and loops through a series of numbers.

RangeEnumerationSample.cs

A client application that uses the RangeEnumeration activity to iterate over a collection of numbers.

The following table details the properties of the RangeEnumeration activity.

 

Property Description

Start

The integer to start the loop from.

Stop

The integer to stop the loop at.

Step

Specifies how much to iterate each time.

Body

Specifies the code to execute during each iteration.

To use this sample

  1. Using Visual Studio 2010, open the RangeEnumeration.sln solution file.

  2. To build the solution, press CTRL+SHIFT+B.

  3. To run the solution, press CTRL+F5.

Important Note:
The samples may already be installed on your machine. Check for the following (default) directory before continuing.

<InstallDrive>:\WF_WCF_Samples

If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.

<InstallDrive>:\WF_WCF_Samples\WF\Scenario\ActivityLibrary\RangeEnumeration




Build Date:

2012-08-02
Show:
© 2014 Microsoft