Connecting Tech Pros Worldwide Help | Site Map

Can iterate List two dimentionally??

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 29th, 2008, 11:40 AM
Newbie
 
Join Date: Oct 2007
Posts: 17
Default Can iterate List two dimentionally??

Hiii, ALL....

I have a bunch of data in tabular format, columns r fixed but rows may varry.
I store this bunch of data in a List.
When I retrive data form this List generally I get a linear format. but I want to retrive data row by row.(This Collection Structure (List) is Fixed here)
Now my q is can I able to iterate the list two dimentionally as we can do in normal two dimentional array ?
Reply
  #2  
Old September 29th, 2008, 12:27 PM
JosAH's Avatar
Moderator
 
Join Date: Mar 2007
Location: Voorschoten, the Netherlands
Age: 52
Posts: 10,062
Default

A List is intrinsically a one dimensional sequence that can only be iterated over
that one single dimension.

kind regards,

Jos
Reply
  #3  
Old September 30th, 2008, 06:30 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,941
Default

Do you have to use a List?
Reply
  #4  
Old October 5th, 2008, 08:47 PM
Member
 
Join Date: Sep 2008
Posts: 33
Default

A 2 dimensional array is really just an array of arrays. You could just as easily have a List of Lists. Each element in the main List would be a List containing one row's worth of info. This would allow the row width to vary. The code to handle this would be very similar to a 2 dimensional array.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.