Iterate through ArrayList using an another ArrayList

  • Thread starter Thread starter Saravanan Rathinavelu
  • Start date 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-
 
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
 
Back
Top