コード例 #1
0
 /// <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());
 }
コード例 #2
0
 /// <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());
 }
コード例 #3
0
 /// <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());
 }
コード例 #4
0
 /// <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));
 }
コード例 #5
0
 /// <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));
 }