我有一个逗号分隔的字符串。
e.g. {"one,two,three"}
任何人都可以告诉我是否可以从中创建一个数组,如果可以,如何创建?在 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
关于vb.net - 如何拆分逗号分隔的字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27035042/