Пример #1
0
 public void RemoveRental(RentalBase rental)
 {
     if (rentalList.Count > 0)
     {
         rentalList.Remove(rental);
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }
Пример #2
0
 public void AddRental(RentalBase rental)
 {
     if (rentalList.Count < 5)
     {
         rentalList.Add(rental);
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }