O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Printing collection items

In this task, we will customize an activity that can print all collection items to Console Application.

How to do it

  1. Create a Workflow Console Application:

    Create a new Workflow Console Application and name it PrintingCollectionItems.

  2. Create an Activity that can print collection items to the Windows Console:

    Add a new Code Activity to the project and name it CollectionPrinter.cs. Refer to the following screenshot:

    How to do it

    Open the CollectionPrinter.cs file and alter the code as follows:

     using System; using System.Collections.Generic; using System.Activities; namespace PrintingCollectionItems { public sealed class CollectionPrinter<T> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required