示例#1
0
 public Switchstate Switchoff() //methods
 {
     if (state == Switchstate.on)
     {
         state = Switchstate.off;
     }
     return(state);
 }
示例#2
0
 public Switch() //constructors
 {
     state = Switchstate.on;
 }