Microsoft.JScript.BitwiseBinary.DoOp C# (CSharp) Method

DoOp() static private method

static private DoOp ( int i, int j, JSToken operatorTok ) : Object
i int
j int
operatorTok JSToken
return Object
      internal static Object DoOp(int i, int j, JSToken operatorTok){
        switch (operatorTok){
          case JSToken.BitwiseAnd:  
            return i & j;
          case JSToken.BitwiseOr:
            return i | j;
          case JSToken.BitwiseXor:
            return i ^ j;
          case JSToken.LeftShift:
            return i << j;
          case JSToken.RightShift:
            return i >> j;
          case JSToken.UnsignedRightShift:
            return ((uint)i) >> j;
          default:
            throw new JScriptException(JSError.InternalError);
        }
      }