示例#1
0
 public IOper CreateOper(string Oper)
 {
     if (Oper.Equals("+"))
     {
         IOper p = new OperAdd();
         return(p);
     }
     if (Oper.Equals("-"))
     {
         IOper p = new OperDec();
         return(p);
     }
     if (Oper.Equals("*"))
     {
         IOper p = new OperRide();
         return(p);
     }
     if (Oper.Equals("/"))
     {
         IOper p = new OperDiv();
         return(p);
     }
     return(null);
 }
示例#2
0
 public IOper CreateOper(string Oper)
 {
     if (Oper.Equals("+"))
     {
         IOper p = new OperAdd();
         return p;
     }
     if (Oper.Equals("-"))
     {
         IOper p = new OperDec();
         return p;
     }
     if (Oper.Equals("*"))
     {
         IOper p = new OperRide();
         return p;
     }
     if (Oper.Equals("/"))
     {
         IOper p = new OperDiv();
         return p;
     }
     return null;
 }