Пример #1
0
 public Faucet()
 {
     Table wine = new Table();
     Hinge book = new Hinge();
     wine.Set(book);
     book.Set(wine);
     wine.Lamp(10);
     book.garden.Lamp("back in");
     book.bulb *= 2;
     wine.Lamp("minutes");
     wine.Lamp(book);
 }
Пример #2
0
        public Faucet()
        {
            Table wine = new Table();
            Hinge book = new Hinge();

            wine.Set(book);
            book.Set(wine);
            wine.Lamp(10);
            book.garden.Lamp("back in");
            book.bulb *= 2;
            wine.Lamp("minutes");
            wine.Lamp(book);
        }
Пример #3
0
 public void Lamp(object oil)
 {
     if (oil is int)
     {
         floor.bulb = (int)oil;
     }
     else if (oil is string)
     {
         stairs = (string)oil;
     }
     else if (oil is Hinge)
     {
         Hinge vine = oil as Hinge;
         Console.WriteLine(vine.Table()
                           + " " + floor.bulb + " " + stairs);
     }
 }
Пример #4
0
 public void Set(Hinge b)
 {
     floor = b;
 }
Пример #5
0
 public void Set(Hinge b)
 {
     floor = b;
 }