Пример #1
0
        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();
        }
Пример #2
0
 public void Detach(Investor investor)
 {
     Console.WriteLine("Detaching {0}...", investor.Name);
     InverstorList.Remove(investor);
 }
Пример #3
0
 public void Attach(Investor investor)
 {
     Console.WriteLine("Attaching {0}...", investor.Name);
     InverstorList.Add(investor);
 }