Export (0) Print
Expand All

ForEach<T>.Values Property

.NET Framework 4.6 and 4.5

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

Namespace:  System.Activities.Statements
Assembly:  System.Activities (in System.Activities.dll)

[RequiredArgumentAttribute]
public InArgument<IEnumerable<T>> Values { get; set; }

Property Value

Type: System.Activities.InArgument<IEnumerable<T>>
The collection of values.

The following code sample demonstrates setting the Values property of a ForEach<T> activity. This example is from the DynamicActivity Creation sample.

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))
        }
    }
},

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft