public Switchstate Switchoff() //methods { if (state == Switchstate.on) { state = Switchstate.off; } return(state); }
public Switch() //constructors { state = Switchstate.on; }