예제 #1
0
 public override bool GetOutput(IOnAble a, IOnAble b)
 {
     if (b != null)
     {
         throw new ArgumentException("Not gate works only with one input");
     }
     return(!a.IsOn());
 }
예제 #2
0
 public override bool GetOutput(IOnAble a, IOnAble b)
 {
     return(a.IsOn() ^ b.IsOn());
 }