Hi Group,
I'm using the split function for the very first time. I understand what it's doing. However I don't know how to output each individual word into a specific variable.
As an example, the string is "Dickerson Tile Company". I have defined 7 variables to accept up to 7 word splits.
Dim Search1, Search2, Search3 ...... Search7
Ultimately I want to output the split into
Search1 = "Dickerson"
Search2 = "Tile"
Search3 = "Company"
My code is currently
Dim s As String = tbxCustomerName.Text
Dim words As String() = s.Split(New Char() {" "c}) 'words are delimited with a space " "
This is where I'm struggling: How do I get my output into the individual buckets? My assumption is I would use an array or For statement. However I can't seem to find the correct syntax to create the name of the variable (Search1, Search2, etc.) and then to get the individual word into each variable. Can you help?
Thanks for your assistance.
Papa Don