In this example, we will use the Break activity to execute only one iteration.
Perform the following steps:
- Add a Sequence activity to the Designer panel.
- Next, add a For each activity inside the Sequence (as mentioned in the preceding section, to use the Break activity, we need the For each activity):
- Create two variables; an integer variable named item, and an array integer variable named x. Then, set them to the text field.
- Now, assign a default value to the integer variable x.
- Add a Break activity inside the body of the loop.
- Under the For Each activity, add a Write line activity.
- In the Write line activity, type item.ToString ...