static void Main(string[] args) { Investor a = new Investor("Sorros"); Investor b = new Investor("Backshire"); IBM ibm = new IBM("IBM", 70.56); ibm.Attach(a); ibm.Attach(b); ibm.Price = 89.00; ibm.Price = 98.88; Console.ReadKey(); }
public void Detach(Investor investor) { Console.WriteLine("Detaching {0}...", investor.Name); InverstorList.Remove(investor); }
public void Attach(Investor investor) { Console.WriteLine("Attaching {0}...", investor.Name); InverstorList.Add(investor); }