Default Value for List Variable

Hello,

How can we assign default values for a List variable in create variable panel. I have tried {“New”, “Old” } but its treating as array. Any help would be appreciated.

Thanks.

1 Like

You would need to do something like:

New List(Of String)(New String() {"New", "Old"})

Explanation:
A List is an object that is part of System.Collection.Generic. In order to initiate an object, you have to use the New keyword. Then we use the List Constructor to initialize the new List object from an Array of strings.

Hope that helps!

2 Likes

Hi @Udayrayalla,

Here you can know about the list variable initialization.

https://www.dotnetperls.com/initialize-list-vbnet

Regards
Balamurugan.S

Thanks.

Thanks Bala.

1 Like

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