G
Guest
I have a List<t> object consisting of objects which in themselves consist of
BindingListViews of objects. When I want to search for a object value I
normally create a foreach loop and increment a counter to provide me a count.
How can I refactor the same function w/o the foreach and use findall instead?
faux data structure:
---------------------
->
| Customers
<t> Orders
| Orders_Details
->
/*start code*/
foreach (Orders _o in _Customers.Orders)
{
if (_o.exists)
i = i + 1;
}
if (i == _Customers.Orders.Count)
mRet = true;
/*end code*/
/*start desired code*/
myList.findall(_o.quantity >1)
/*end desired code*/
I want to take advantage of the Findall method in the generics namespace.
thanks
BindingListViews of objects. When I want to search for a object value I
normally create a foreach loop and increment a counter to provide me a count.
How can I refactor the same function w/o the foreach and use findall instead?
faux data structure:
---------------------
->
| Customers
<t> Orders
| Orders_Details
->
/*start code*/
foreach (Orders _o in _Customers.Orders)
{
if (_o.exists)
i = i + 1;
}
if (i == _Customers.Orders.Count)
mRet = true;
/*end code*/
/*start desired code*/
myList.findall(_o.quantity >1)
/*end desired code*/
I want to take advantage of the Findall method in the generics namespace.
thanks