Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Get element from Arraylist

Get element from Arraylist

Scheduled Pinned Locked Moved Visual Basic
data-structureshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nimolZero
    wrote on last edited by
    #1

    Hi for all programmer ! pls look , save and solve my problem below Dim myarraylist As ArrayList = New ArrayList() Dim array1(,) = {{"banana"}, {"Pineple"}} Dim array2(,) = {{"Mango"}, {"Peach"}} myarraylist.Add(array1) myarraylist.Add(array2) Mean that myarraylist store two Array in it. i want to extract each element out from myarraylist what should i do ? i wait for all your reply na. regards from Anatha

    _ 1 Reply Last reply
    0
    • N nimolZero

      Hi for all programmer ! pls look , save and solve my problem below Dim myarraylist As ArrayList = New ArrayList() Dim array1(,) = {{"banana"}, {"Pineple"}} Dim array2(,) = {{"Mango"}, {"Peach"}} myarraylist.Add(array1) myarraylist.Add(array2) Mean that myarraylist store two Array in it. i want to extract each element out from myarraylist what should i do ? i wait for all your reply na. regards from Anatha

      _ Offline
      _ Offline
      _mubashir
      wrote on last edited by
      #2

      Access the items of Arraylist like myarraylist(0), myarraylist(1) and so on. Note Arraylist item will return object so you have to cast it into the correct object (2D array in your case).


      Mubashir Software Architect Storan Technologies Inc, USA Every job is a self portrait of the person who did it.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups