Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 29th, 2008, 12:40 PM
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, 01:27 PM
JosAH's Avatar
Moderator
 
Join Date: Mar 2007
Location: Voorschoten, the Netherlands
Age: 52
Posts: 8,760
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, 07:30 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,443
Default

Do you have to use a List?
Reply
  #4  
Old October 5th, 2008, 09:47 PM
Newbie
 
Join Date: Sep 2008
Posts: 31
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 205,248 network members.