I am coding VB.NET in VS2008.
I have a comma delimited string of numbers, i.e. 16,7,99,1456,1,3
I do this in VB:
Dim MyArr() As String = MyString.Split(",")
Will MyArr keep the items in the order they were in the string?
If I do this:
For Each S as String in MyString.Split(",")
'Do something with S
'Will my items be in the same order they were
'in the string?
Next
I tested it and it appears to keep the sort order but will it ~always~ keep the order?
If it does not maintain the order then what is a good way to split a string and keep order?
I'm asking because MSDN Array documentation says: "The Array is not guaranteed to be sorted." So I'm a bit unsure.