Exemplo n.º 1
0
        public static MatchCollection StringToMatches(string inputString)
        {
            Regex           newReg  = new Regex(ModuleOperators.pattern());
            MatchCollection matches = newReg.Matches(inputString);

            return(matches);
        }
Exemplo n.º 2
0
 public static float GetOperatorCalc(string symbol, float x, float y)
 {
     foreach (classSymbol item in ModuleOperators.Operators())
     {
         if (item.Symbol == symbol)
         {
             return(item.Calc(x, y));
         }
     }
     throw new ArgumentException();
 }
Exemplo n.º 3
0
 public static int GetOperatorPrioritet(string symbol)
 {
     foreach (classSymbol item in ModuleOperators.Operators())
     {
         if (item.Symbol == symbol)
         {
             return(item.Prioritet);
         }
     }
     throw new ArgumentException();
 }