public static void BadStuff() { var Milk = new BadCommodity("milk", 30.0); var Wood = new BadCommodity("wood", 0.009); var tmp = new BadWatchdog(); tmp.StartWatching(Milk); tmp.StartWatching(Wood); Milk.Price += 3210.0; Milk.Price += 9999.0; Wood.Price -= 9.0; }
public void StartWatching(BadCommodity com) { com.NewPriceSetEvent += WatchStock; }