Quote Originally Posted by jmcilhinney View Post
I was hoping that the OP would be able to do some thinking for themselves but, as we're taking that responsibility away from them:
vb.net Code:
  1. Private Function GetSubset(ByVal numbers As String, ByVal startIndex As Integer) As String
  2.     Dim superset As String() = numbers.Split(New Char() {","c}, _
  3.                                              StringSplitOptions.RemoveEmptyEntries)
  4.     Dim subset As New List(Of String)
  5.  
  6.     For index = startIndex To superset.GetUpperBound(0) Step 3
  7.         subset.Add(superset(index))
  8.     Next
  9.  
  10.     Return String.Join(",", subset.ToArray())
  11. End Function
  12.  
  13. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  14.     Dim str1 = "11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,"
  15.     Dim str2 = "11,12,13,14,15,16,17,18,19,20,21,22,23,24,25"
  16.  
  17.     MessageBox.Show(Me.GetSubset(str1, 1 - 1))
  18.     MessageBox.Show(Me.GetSubset(str2, 8 - 1))
  19. End Sub
EDIT: Actually, now that I look at the examples provided in the first post, this code won;t do what they indicate is required, although it will do what's actually described in the words of the post.
I like your solution, I should have though of building a list(of string)

I didn't know about the Step in a for statement so cheers for that