I have a comma separated string.
e.g. {\"one,two,three\"}
Can anyone please tell me if I can create an array from this and if so, how? in VB.
' you want to split this input string
Dim s As String = "one,two,three"
' Split string based on comma
Dim words As String() = s.Split(New Char() {","c})
' Use For Each loop over words and display them
Dim word As String
For Each word In words
Console.WriteLine(word)
Next
Like this:
dim str as string = "one,two,three"
dim str2() as string = split(str, ",")
Reference: