UiPath Advanced RPA Developer (UiARD) — Question 41

A developer has two collections containing data:
1. A list of strings called listA that was initialized with 2 items
2. An array of strings called arrayB that was initialized with 2 items
How can both collections be combined into a single 4-item collection called results?

Answer options

Correct answer: C

Explanation

The correct answer is C because using a Multiple Assign activity allows you to iterate through arrayB and add each item to listA, effectively combining both collections. Option A is incorrect as it only adds arrayB to an existing collection without combining elements. Option B is not suitable since String.Join creates a single string rather than merging the collections. Option D incorrectly suggests adding items from listA to arrayB instead of the other way around.