Member Avatar for westsiderailway

Hi Everyone.
this is the last part of my function

 Case "December"
                If cbMonthly.SelectedItem = "December" Then
                    Dim DecStart As String = "-12-01"
                    Dim DecFin As String = "-01-01"
                    M12S = String.Concat(Year, DecStart)
                    M12F = String.Concat(Year, DecFin)
                End If
        End Select
        Dim Places As New List(Of String)
        Places.Add(M12S)
        Places.Add(M12F)

        Return Places

in my button click event, which calls my function, i get an out of bounds error

        Dim Places As New List(Of String)
        GetMonth()
        Dim M12S As String = Places.Item(0)
        Dim M12F As String = Places.Item(1)

Can anybody tell me what i am doing wrong.

Many Thanks

Member Avatar for westsiderailway

ok everyone, have figured what i have done wrong, and corrected it. heheeh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.