I am trying to split a string into array. I know about split, but it seems to need a separator of some type. Suppose I am going to be working with input like the following.
8561369
and I want to split each character of that string into an array.
I tried something like this, but again Split seems to need a separator, I just keep getting the entire string in one entry of my array, not split.
I am very new to VB.net and I am using Visual Basic 2008 Express Edition. Thanks in advance.
8561369
and I want to split each character of that string into an array.
I tried something like this, but again Split seems to need a separator, I just keep getting the entire string in one entry of my array, not split.
VB.NET:
Dim values as String
'I am going to be populating this string variable via user input eventually, 'which is why I cannot just add spaces.
values = "8561369"
Dim numbers = values.Split()
Dim n as String
For Each n In numbers
Console.WriteLine(n)
Next n
I am very new to VB.net and I am using Visual Basic 2008 Express Edition. Thanks in advance.