示例#1
0
        public override string ToString()
        {
            switch (Op)
            {
            case BooleanOperation.A:
                return(Left.ToString());

            case BooleanOperation.B:
                return(Right.ToString());

            case BooleanOperation.One:
            case BooleanOperation.Zero:
                return(PrintOperation(Op));

            case BooleanOperation.NotA:
                return("!" + Left.ToString());

            case BooleanOperation.NotB:
                return("!" + Right.ToString());

            default:
                return("(" + Left.ToString() + " " + PrintOperation(Op) + " " + Right.ToString() + ")");
            }
        }
示例#2
0
 public override string ToString()
 {
     return(String.Format("F({0},{1},{2})", First.ToString(), Second.ToString(), Third.ToString()));
 }
示例#3
0
 public bool Equals(BooleanExpression obj)
 {
     return(ToString() == obj.ToString());
 }
 public bool Equals(BooleanExpression obj)
 {
     return ToString() == obj.ToString();
 }