Пример #1
0
 public static int SortByPrice(ShoppingCartItem item1, ShoppingCartItem item2)
 {
     return item1.Price.CompareTo(item2.Price);
 }
Пример #2
0
 public static int SortByName(ShoppingCartItem item1, ShoppingCartItem item2)
 {
     return item1.ItemName.CompareTo(item2.ItemName);
 }