コード例 #1
0
ファイル: currency.cs プロジェクト: SSCLI/sscli_20021101
        // Compares this object to another object, returning an integer that
        // indicates the relationship.
        // Returns a value less than zero if this  object
        // null is considered to be less than any instance.
        // If object is not of type Currency, this method throws an ArgumentException.
        //

        public int CompareTo(Object value)
        {
            if (value == null)
            {
                return(1);
            }
            if (!(value is Currency))
            {
                throw new ArgumentException(Environment.GetResourceString("Arg_MustBeCurrency"));
            }

            return(Currency.Compare(this, (Currency)value));
        }