How to make a list of lists

I have two different paths and want to append them into a list.
I want to do it because I want to iterate files in a loop.

I have tried this below but cannot assign values.


Please help.

new List(Of String()) in your case

and concatening both arrays to a list:

1 Like

Thank you for your help.

I just concatenate the two list with arrList = path1.Concat(path2).ToList, it worked.

But what do you mean

AND concatenate both arrays to a list?

It is not necessary to assign New List(Of String()) from {(arr1), (arr2)} correct?
If I use New List(Of String()) from {(path1), (path2)}, isn’t it already concatenated?(I tried this and I couldn’t iterate this one.)

as arrList was already defined (and this is correct to do it so) your code line was working.
The screenshots were done on UiPathe immediate panel during debugging and for prototyping purpose it showed the initialization demo line. More clear now?

Perfect, it is working. May we ask yout then to close the topic by marking solving post as solution. So others can benefit from it. Thanks

1 Like

Yes more clear and thank you for your quick response.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.