Diff between Add Item to the List and Add Item to the Collection Activities

Diff between “Add Item to the List” and “Add Item to the Collection” Activities

please make a understandable way

@venkatasai
Add to Collection:

  • Works with any collection implementing ICollection<T>.
  • Flexible and can handle List<T>, ArrayList, HashSet, etc.
  • Parameters: Collection, Item, TypeArgument.

Add to List:

  • Specifically designed for List<T> types.
  • More straightforward but limited to lists.
  • Parameters: List, Item, TypeArgument.

The word collection only tells that it take List,Arrays,Hashset ,The Add to list specify the List only

Hi @venkatasai

The activity names are not “Add Item to List” and “Add Item to Collection.” You may have typed them wrong. They are actually “Append Item to Collection” and “Append Item to List.”

→ The “Append Item to Collection” activity is used to add items to any type of collection, such as a List, Enumerable, etc.
→ However, as the activity name suggests, the “Append Item to List” activity is specifically used for adding items to a List and does not support other types of collections.

Hope it helps!!

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