ForEach<T>.Values Property

Definition

The activity's collection of inputs for the execution of the Body activity action.

C#
[System.Activities.RequiredArgument]
public System.Activities.InArgument<System.Collections.Generic.IEnumerable<T>> Values { get; set; }

Property Value

The collection of values.

Attributes

Examples

The following code sample demonstrates setting the Values property of a ForEach<T> activity.

C#
new ForEach<int>
{
    Values =  new ArgumentValue<IEnumerable<int>> { ArgumentName = "Numbers" },
    Body = new ActivityAction<int>
    {
        Argument = iterationVariable,
        Handler = new Assign<int>
        {
            To = accumulator,
            Value = new InArgument<int>(env => iterationVariable.Get(env) +  accumulator.Get(env))
        }
    }
},

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1