Unable To Initialize Out Argument

Hello,

I am having an issue that I can’t quite figure out. To give a basic break down, we are reading values out of an excel file, then adding them as strings into an array of strings, then I want to use that array of strings as an out argument so that we can type the data read from the cell values into a search bar. So far everything works fine except for when trying to assign anything to the array of strings out argument, it always says that it isn’t initialized, but I can’t set any default values since it is an out argument. I’m sure there is something that I am missing; so if anyone can fill me in I would greatly appreciate it.

Thanks

Welcome to the forum

Assign Activity
out_YourArgument = YourStringArrayVar

maybe List type will better fit. If any initalization is needed then have look below

new List(Of String)
Enumerable.Empty(of String).toXXX | XXX = Array, XXX= List

Hi @Jolley,

Whenever we are gonna use Array or List, we have initalize the value of the variable/argument created.

Array - New array (Of String)
List - new List(Of String)

Once you have initalized it then try to send it as Out argument.

Hope this will be helpful !!

Thanks in advance,
Jayavignesh G

@ppr @Jayavignesh_G

Thanks guys, not sure why the array was having issues, but it seems like the list is working much better, I really appreciate all the assistance

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