Convert an IEnumerable<> to List<>

How to convert an IEnumerable<> to List<> ?

Resolution

In C#, an IEnumerable can be converted to a List through the following lines of code:

IEnumerable<int> enumerable = Enumerable.Range(1, 300);
List<int> asList = enumerable.ToList();

To achieve the same result in UiPath:

  • Create a List<> variable to store the List.
  • Use an "Assign" activity to convert the IEnumerable<> to a List using the .ToList() method and store it into the List<> variable.

See below for an example: 
Image_2020-03-25_15-40-53.png