Module Module1

    Sub Main()
        Dim myList As New List(Of Integer)

        For i As Integer = 1 To 20 Step 2
            myList.Add(i)
        Next

        Console.WriteLine("η λίστα")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        myList.RemoveAt(2)

        Console.WriteLine("Η RemoveAt(2)")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        myList.RemoveRange(5, 3)
        Console.WriteLine("H RemoveRange(5,3)")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        myList.Add(3)
        myList.Remove(3)
        Console.WriteLine("H Remove(3)")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        myList.Clear()
        Console.WriteLine("H Clear")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        myList.Sort()
        Console.WriteLine("H Sort()")
        For i As Integer = 0 To myList.Count - 1
            Console.WriteLine(myList.Item(i))
        Next

        Console.WriteLine("H IndexOf(7)")
        Console.WriteLine(myList.IndexOf(7))

        Console.WriteLine("H GetRange(1,3)")
        For Each number As Integer In myList.GetRange(1, 3)
            Console.WriteLine(number)
        Next

        Dim pinakas1() As Integer
        pinakas1 = myList.ToArray


        Console.ReadKey()

    End Sub

End Module
