Ejemplo n.º 1
0
 public void RemoveRental(RentalBase rental)
 {
     if (rentalList.Count > 0)
     {
         rentalList.Remove(rental);
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }
Ejemplo n.º 2
0
 public void AddRental(RentalBase rental)
 {
     if (rentalList.Count < 5)
     {
         rentalList.Add(rental);
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }