Пример #1
0
 /// <summary>
 /// Checks if one value of this type is equal to another value of this
 /// type.
 /// </summary>
 /// <param name="operand0">Left-hand operand.</param>
 /// <param name="operand1">Right-hand operand.</param>
 /// <returns>The result of the operation.</returns>
 public bool IsEqualTo(object operand0, object operand1) =>
 GenerateBinaryPredicate(OpCodes.Ceq)(operand0, operand1);
Пример #2
0
        /// <summary>
        /// Checks if one value of this type is greater than another value of
        /// this type.
        /// </summary>
        /// <param name="operand0">Left-hand operand.</param>
        /// <param name="operand1">Right-hand operand.</param>
        /// <returns>The result of the operation.</returns>
        public bool IsGreaterThan(object operand0, object operand1)
        {
            var opcode = IsSigned ? OpCodes.Cgt : OpCodes.Cgt_Un;

            return(GenerateBinaryPredicate(opcode)(operand0, operand1));
        }