Add array to collections


I’m having trouble creating a collection of array. What I need to do is group the 3 values into an array, I extract from a worksheet, and put each of those groups in a collection.

I used the add to collection activity and passed the array in the item field.
The variable type i used is ICollection

Here is the error I’m getting:
Add To Collection: The property ‘Collection’ of ‘Add To Collection’ is not initialized.

Not sure how to initialize a collection of arrays. Thanks in advance!

1 Like

Hi @mimuh,

Initialize the variable like this New Collection()


Hi @Pradeep_Shiv,

Thanks for the response. I tried doing that but I’m getting this error:
Compiler error(s) encountered processing expression “New Collection()”.
Option Strict On disallows implicit conversions from ‘Microsoft.VisualBasic.Collection’ to ‘System.Collections.Generic.ICollection(Of System.Array)’.

I made a mistake in the question, I am using property type ICollection not ICollection

ICollection Array*

1 Like

Oh I just got it working with putting: ICollection(Of System.Array) as the initial value.
thanks for the idea!

Can you share the screenshot?

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