Children’s show “Sesame Street” famously ends each episode with a message along the lines of, “Today’s episode is brought to you by the letter ‘B’.”

The alphabet is the first thing that’s drilled into us when we’re learning our native language. Brenden’s co-worker definitely understands the alphabet. Their grasp of loops and conditionals on the other hand…

Public Sub CreateAlphabets()
       Dim tempTable As New DataTable

       For i As Integer = 0 To 26
           Dim dr As DataRow
           dr = tempTable.NewRow

           Select Case i
               Case 0
                   dr.Item("ID") = "A"
                   dr.Item("Alphabets") = "A"
               Case 1
                   dr.Item("ID") = "B"
                   dr.Item("Alphabets") = "B"
               Case 2
                   dr.Item("ID") = "C"
                   dr.Item("Alphabets") = "C"
               Case 3
                   dr.Item("ID") = "D"
                   dr.Item("Alphabets") = "D"
               ' SNIP … 
               Case 24
               	dr.Item("ID") = "Y"
               	dr.Item("Alphabets") = "Y"
               Case 25
                   dr.Item("ID") = "Z"
                   dr.Item("Alphabets") = "Z"
           End Select


       Me.rptAlphabets.DataSource = tempTable
End Sub

This code, by the way, is to help generate a list of links to pages where lists of users are grouped by the first letter in their name.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!