static void Main(string[] args) { lampe Living = new lampe(); lampe Toilettes = new lampe(); interrupteur interLiving = new interrupteur(Living); interLiving.on(); interLiving.off(); //Living.allume(); //Living.eteint(); Console.ReadLine(); }
public interrupteur(lampe MaLampe) { this.MaLampe = MaLampe; OnOff = "off"; Console.WriteLine("Creation inter: etat :" + this.OnOff); }
//constructeur public interrupteur(lampe MaLampe) { this.MaLampe = MaLampe; OnOff = "OFF"; Console.WriteLine("Crétaion interrupteur: etat: " + this.OnOff); }