Hi
lets say i had 2 list(of class1) objects
and wanted to iterate through them checking for something with a for each loop, i always have a problem keeping the code simple because i have to iterate through one then make otherloops and it all gets messy quickly.
im trying to do something like this
so here ill have 1 outerloop, then use the method fornext related to list class to do an innerloop, to compare variables within each class.
how do i actually achieve something like this, i just cant make it work, and it looks so much tidier then nested loops etc
i cant find any good help with this
or
is there another way to do it?
lets say i had 2 list(of class1) objects
and wanted to iterate through them checking for something with a for each loop, i always have a problem keeping the code simple because i have to iterate through one then make otherloops and it all gets messy quickly.
im trying to do something like this
Code:
for each item in list1
if list2.foreach(function(i)
'then something like'
if i.name = item.name
return false
end function) then
do some other code
end if
next
how do i actually achieve something like this, i just cant make it work, and it looks so much tidier then nested loops etc
i cant find any good help with this
or
is there another way to do it?