7

Let’s say that this is my string:

1 2 3

I want to split the string by " " (space) and display every time part of my string.

4

1 に答える 1

18

This will do what you need:

Dim str As String = "1 2 3"
Dim strarr() As String
strarr = str.Split(" "c)
For Each s As String In strarr
    MessageBox.Show(s)
Next
于 2012-06-20T11:50:30.970 に答える