Example #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);
 }
Example #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;
 }