Foreach==>If==>Return的解读
foreach (ShoppingCartItem shoppingCartItem in Items)
{
if (shoppingCartItem.ProductId == item.ProductId)
{
return;
}
}
解读:当《shoppingCartItem.ProductId == item.ProductId》时什么都不返回。
浙公网安备 33010602011771号