ForEach<T>.Body Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ActivityAction to be executed for each item in the Values collection.
public:
property System::Activities::ActivityAction<T> ^ Body { System::Activities::ActivityAction<T> ^ get(); void set(System::Activities::ActivityAction<T> ^ value); };
C#
public System.Activities.ActivityAction<T> Body { get; set; }
member this.Body : System.Activities.ActivityAction<'T> with get, set
Public Property Body As ActivityAction(Of T)
The action to be executed.
The following code sample demonstrates setting the Body 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))
}
}
},
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 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: