Export (0) Print
Expand All

RangeEnumeration Activity

This topic applies to Windows Workflow Foundation 4 (WF4).

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


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


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


The integer to start the loop from.


The integer to stop the loop at.


Specifies how much to iterate each time.


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.

Dd797588.Important(en-us,VS.100).gif Note:
The samples may already be installed on your machine. Check for the following (default) directory before continuing.


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.


Community Additions

© 2015 Microsoft