How to Initialize List of datatype system.collections.objectmodel.collection<system.string[]>


How to initialize a List which is of datatype system.collections.objectmodel.collection<system.string>
i tried with list=new list(of string) or list=new list(of string) or list=new system.collections.objectmodel.collection(of system.string) but none of them are working, i am getting an implicit coversion error. Can any one tell me how to Initialize the List? I tried forum links, it did not work.


Hi @Santhosh_Hyd,
Refer to this link:

Hi Maria,

Thanks for the Quick Response, but unfortunately it is not working for me, the issue I have is List item datatype is “Object Model” but the above code only works when List datatype is generic.

can you try: new List(Of String()) and ensure that it is assigned to a [System.Collections.Generic.List`1[System.String]]

from where comes the system.collections.objectmodel.collection<system.string> datatype into the picture?

But also have a look here:
import system.Collections.Objectmodel to the namespaces:

then you can do:

1 Like

Hi @Santhosh_Hyd,
can you please try this : new Collection(Of String)

i tried this, it didnt work

Thanks, i tried this earlier but didnt work , but after importing it, it worked

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