Exemple #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);
 }
Exemple #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);
        }
Exemple #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);
     }
 }
Exemple #4
0
 public void Set(Hinge b)
 {
     floor = b;
 }
Exemple #5
0
 public void Set(Hinge b)
 {
     floor = b;
 }