Exemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="Currency">An object to compare with.</param>
        public Int32 CompareTo(Currency Currency)
        {
            if (Currency is null)
            {
                throw new ArgumentNullException("The given Currency must not be null!");
            }

            var c = ISOCode.CompareTo(Currency.ISOCode);

            if (c == 0)
            {
                c = Numeric.CompareTo(Currency.Numeric);
            }

            if (c == 0)
            {
                c = Name.CompareTo(Currency.Name);
            }

            return(c);
        }