I have a comma-separated string. For example,
{"one,two,three"}
Can I create an array from this and if so, how? In VB.NET.
' 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With