I have a class like this
Class Myclass
itemdata as string
name as string
End Class
how do i initialised this class with and array of string for both properties?
this is what i am trying, which os obviously wrong
Dim ls As New List(Of Myclass)(New Myclass() {("A1,A2,A3,A4".Split(","))})
I need something like this after initialization, the value of each item in the list will be like as if assigned manually like this
List(0).itemdata="A1"
List(0).name="A1"
List(1).itemdata="A2"
List(2).name="A2"
etc