Bewerken

Delen via


ForEach<T>.Values Property

Definition

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

public:
 property System::Activities::InArgument<System::Collections::Generic::IEnumerable<T> ^> ^ Values { System::Activities::InArgument<System::Collections::Generic::IEnumerable<T> ^> ^ get(); void set(System::Activities::InArgument<System::Collections::Generic::IEnumerable<T> ^> ^ value); };
[System.Activities.RequiredArgument]
public System.Activities.InArgument<System.Collections.Generic.IEnumerable<T>> Values { get; set; }
[<System.Activities.RequiredArgument>]
member this.Values : System.Activities.InArgument<seq<'T>> with get, set
Public Property Values As InArgument(Of IEnumerable(Of T))

Property Value

The collection of values.

Attributes

Examples

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

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