Beispiel #1
0
        /// <summary>Compares this instance with a specified Money and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified
        /// </summary>
        /// <param name="other">
        /// The Money to compare with this instance.
        /// </param>
        /// <returns>
        /// A 32-bit signed integer that indicates whether this instance precedes, follows,
        /// or appears in the same position in the sort order as the value parameter.
        /// </returns>
        public int CompareTo(Money other)
        {
            var compare = m_Currency.CompareTo(other.m_Currency);

            if (compare == 0)
            {
                compare = m_Value.CompareTo(other.m_Value);
            }
            return(compare);
        }