Instead of
ArrayList
, I think it is more suitable for you to use a List<t> here. Change it to
List<cshoppingcartitem> items = new <cshoppingcartitem>();
add your items to that list. When you want to update an item loop through the list and find the item and update it.
foreach(CShoppingCartItem cItem in items)
{
if(condition)
{
item.inquntity = 2;
}
}