How to get value from Array List

  • Dim list1 As New ArrayList

     list1.Add(1)
      list1.Add(2) 

     list1.Add(3)
      list1.Add(4) 


    list1.Add(5)
      list1.Add(6) 

     list1.Add(7)
      list1.Add(8) 

    list1.Add(9)
      list1.Add(10)

    Dim num As Integer


    For Each num In list1
    MessageBox.Show(num)
    Next


    Another Way to do that


    For i As Integer = 0 To list1.Count - 1 


    Dim val As String = list1(i).ToString()

    Next

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week