How to add array item to list?

i have an array:
arrRandomNumber = 4455

arrUserInp = 4400

i am matching every element in arrRandomNumber with elements in arrUserInp .
if items dint match then i want to add it into a new List

How do i add array items to list?

@ANSHUL,

Use Add To Collection activity.

Hi

You can use a For Each activity to loop through the array items. If the condition matches, use a add to collection item to add the current loop Item to a list. In the add to collection activity there is a property called collection. There you can pass the item as a input parameter…

Hello @ANSHUL
new List lst = arrRandomNumber.Except(arrUserInp).ToList

How does remove from collection works?

if i want to remove everything from collection ?

To remove everything from collection use,
Clear collection activity