Converting one datatype to another is one of the most common things we do in programming.
Let’s see how to convert a list to an array and Vice Versa…
1. Convert List to Array
2.Convert Array To List
1. Convert List to Array
our_Array = our_List.ToArray
Example:
Implementation using UiPath :
Let us implement a workflow which converts “List” to an “Array”
Step 1:
Create variables as shown below
Step 2:
Drag “Assign” activity into the design panel and initialize the list of string type.
Step 3:
Drag another “Assign” activity into the design panel
Use the above-mentioned code and its done.
Click here to download the Source Code…
2. Convert Array to List
our_List = our_Array.ToList
Example:
Implementation using UiPath :
Let us implement a workflow which converts an “Array” to “List”
Step 1:
Create variables as shown below
Step 2:
Drag “Assign” activity into the design panel and initialize the Array of string type.
Step 3:
Drag another “Assign” activity into the design panel
Use the above-mentioned code and its done.
Click here to download the Source Code…
Hope it has helped you…
Excellent bro