Exemplo n.º 1
0
 public static object LeftShift(int x, object other)
 {
     if (other is int)
     {
         return(LeftShift(x, (int)other));
     }
     else if (other is long)
     {
         return(Int64Ops.LeftShift((long)x, other));
     }
     else if (other is BigInteger)
     {
         return(LongOps.LeftShift(BigInteger.Create(x), other));
     }
     else if (other is bool)
     {
         return(LeftShift(x, (bool)other ? 1 : 0));
     }
     else if (other is ExtensibleInt)
     {
         return(LeftShift(x, ((ExtensibleInt)other).value));
     }
     else if (other is byte)
     {
         return(LeftShift(x, (byte)other));
     }
     return(Ops.NotImplemented);
 }