Values Property
Collapse the table of content
Expand the table of content

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)

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
Available since 4.0
Return to top
© 2015 Microsoft