Example #1
0
        /// <summary>
        /// Returns a value indicating whether this instance is equal to a specified value
        /// </summary>
        public override bool Equals(object obj)
        {
            AtomicSByte atom = (AtomicSByte)obj;

            if (atom == default(AtomicSByte))
            {
                return(false);
            }

            return((sbyte)atom.fValue == (sbyte)fValue);
        }
Example #2
0
        /// <summary>
        /// Compares this instance to a specified value and returns an indication of their relative values.
        /// </summary>
        /// <param name="target">A value to compare.</param>
        /// <returns>A signed integer that indicates the relative order of this instance and value.Return
        /// Value Description Less than zero This instance is less than value. Zero This
        /// instance is equal to value. Greater than zero This instance is greater than value.
        /// </returns>
        public int CompareTo(object target)
        {
            AtomicSByte value = (AtomicSByte)target;

            if (value == default(AtomicSByte))
            {
                return(1);
            }
            else
            {
                return(CompareTo(value));
            }
        }
Example #3
0
 /// <summary>
 /// Compares this instance to a specified value and returns an indication of their relative values.
 /// </summary>
 /// <param name="value">A value to compare.</param>
 /// <returns>A signed integer that indicates the relative order of this instance and value.Return
 /// Value Description Less than zero This instance is less than value. Zero This
 /// instance is equal to value. Greater than zero This instance is greater than value.
 /// </returns>
 public int CompareTo(AtomicSByte value)
 {
     return(((sbyte)fValue).CompareTo((sbyte)value.fValue));
 }