Пример #1
0
 //A function to make the next function take the standard notification method is nothing else is specified
 public int SetSale(Vehicle v, Seller s)
 {
     return SetSale(v, s, s.RecieveNotification);
 }
Пример #2
0
 //A function to set a car for sale
 public int SetSale(Vehicle v, Seller s, Action<Vehicle, decimal> notificationMethod)
 {
     int AuctionNumber = v.RegNumber.GetHashCode();
     ForSale.Add(AuctionNumber, v);
     v.VehicleSeller = s;
     v.notify = notificationMethod;
     return AuctionNumber;
 }
Пример #3
0
 //METHODS
 public void RecieveNotification(Vehicle v, decimal bid)
 {
     Console.WriteLine("\nAn interesting bid has been placed on:\n{0}\nThe bid is: {1:C}", v, bid);
 }