/// <summary> /// Performs the addition operation with the given values. /// </summary> /// <param name="left">The left side value.</param> /// <param name="right">The right side value.</param> /// <param name="wrapAround">Whether or not values will wrap if the operation overflows. Otherwise, cap out at IntPtr.MaxValue or IntPtr.MinValue.</param> /// <returns>The result of the operation.</returns> public static UIntPtr Add(this UIntPtr left, dynamic right, Boolean wrapAround = true) { return(IntPtrExtensions.DoOperation(left.ToIntPtr(), right, ExpressionType.Add, wrapAround).ToUIntPtr()); }
/// <summary> /// Performs the modulo operation with the given values. /// </summary> /// <param name="left">The left side value.</param> /// <param name="right">The right side value.</param> /// <returns>The result of the operation.</returns> public static UIntPtr Mod(this UIntPtr left, dynamic right) { return(IntPtrExtensions.DoOperation(left.ToIntPtr(), right, ExpressionType.Modulo).ToUIntPtr()); }
/// <summary> /// Performs the division operation with the given values. /// </summary> /// <param name="left">The left side value.</param> /// <param name="right">The right side value.</param> /// <returns>The result of the operation.</returns> public static UIntPtr Divide(this UIntPtr left, dynamic right) { return(IntPtrExtensions.DoOperation(left.ToIntPtr(), right, ExpressionType.Multiply).ToUIntPtr()); }
/// <summary> /// Performs the modulo operation with the given values. /// </summary> /// <param name="left">The left side value.</param> /// <param name="right">The right side value.</param> /// <returns>The result of the operation.</returns> public static IntPtr Mod(this IntPtr left, dynamic right) { return(IntPtrExtensions.DoOperation(left, right, ExpressionType.Modulo)); }
/// <summary> /// Performs the multiplication operation with the given values. /// </summary> /// <param name="left">The left side value.</param> /// <param name="right">The right side value.</param> /// <param name="wrapAround">Whether or not values will wrap if the operation overflows. Otherwise, cap out at IntPtr.MaxValue or IntPtr.MinValue.</param> /// <returns>The result of the operation.</returns> public static IntPtr Multiply(this IntPtr left, dynamic right, Boolean wrapAround = true) { return(IntPtrExtensions.DoOperation(left, right, ExpressionType.Multiply, wrapAround)); }