Iterate through ArrayList using an another ArrayList

  • Thread starter Saravanan Rathinavelu
  • Start date
S

Saravanan Rathinavelu

Let's say there is an ArrayList(s) A and B.
A has 1 column and 5 rows.
B has 10 columns and 10 rows, where column1 on both being
the same with additional rows in B.

Using ArrayList A need to loop through B and pull only
those exist on both ie., 5 rows out of B with 10 columns
and assign it to an another ArrayList say C. Later i can
use C to bind to a DataGrid as well as give an option to
bind the complete B to the DataGrid.

Could someone help me figuring out how to get this done.
thanks
-Saravanan.R-
 
N

Natty Gur

Hi,

you can use BinarySearch with IComparer.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top