Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }