How to initiate List<String[]>?

Throwing error when initializing items = new List(of string) where items type is List(String)

Please assist on this.

Thanks,
Vyshali

4 Likes

Hi @vyshalicr you can do that this way : myList = New List(Of String())

Regards.
Masiré

17 Likes

hey @vyshalicr

You can refer this link for some help:

Regards…!!
Aksh

1 Like

Hi @aksh1yadav

Above mentioned example shows how to initiate List(String) but not List(String). There is syntax error while assigning list to new List(of string).

Thanks,
Vyshali

Thanks @Masire. It works!

1 Like

Hey, If you want to initialize the list while variable creation you can initialize it using below syntax.

Example:
new List(of string)(new string(){“value1”,“value2”})

16 Likes

Hi @vyshalicr,

Can you please sample xaml using List(String) as I have trouble getting initializing and getting the value from the List? Thanks in advance!

Hi @JPOkawa,

For Example
Variable → liststr ->DataType is List(string)

liststr=new List(Of string[])

use add to collection activity to add the data into list.

Regards,
Arivu

3 Likes

Hi @arivu96,

That’s what i have used and add collection too. But Add to collection encountered some error. Can you please share the screenshot of the add to collection or would be great if you can share the xaml itself? thanks!

Hi @JPOkawa,

What exception are you getting?? Send me the error message and screenshot.

Regards,
Arivu

Hi @arivu96,

Please let me know how to creat new variable List.
And how to input sheet data to that list.
I want to copy each sheet data in file excel to that list.

Thank you

Sorry, that variable is “List < Datatable >”.

liststr=new List(of DataTable)

Regards, Arivu :slight_smile:

Good. It is Ok
Thank you

cuold some one tell me how to use reframework