How to initiate List<String[]>?

uiautomation

#1

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

Please assist on this.

Thanks,
Vyshali


#2

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

Regards.
Masiré


#3

hey @vyshalicr

You can refer this link for some help:

Regards…!!
Aksh


#4

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


#5

Thanks @Masire. It works!


#6

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”})


#7

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!


#8

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


#9

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!


#10

Hi @JPOkawa,

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

Regards,
Arivu


#11

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


#12

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


#13

liststr=new List(of DataTable)

Regards, Arivu :slight_smile:


#14

Good. It is Ok
Thank you


#15

cuold some one tell me how to use reframework