예제 #1
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Returns the formatted string version of the currency pair.
 /// <para>
 /// The format is '${baseCurrency}/${counterCurrency} ${rate}'.
 ///
 /// </para>
 /// </summary>
 /// <returns> the formatted string </returns>
 public override string ToString()
 {
     return(pair + " " + (DoubleMath.isMathematicalInteger(rate) ? Convert.ToString((long)rate) : Convert.ToString(rate)));
 }
        //-------------------------------------------------------------------------
        /// <summary>
        /// Gets the amount as a string.
        /// <para>
        /// The format is the currency code, followed by a space, followed by the
        /// amount: '${currency} ${amount}'.
        ///
        /// </para>
        /// </summary>
        /// <returns> the currency amount </returns>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @ToString public String toString()
        public override string ToString()
        {
            return(currency + " " + (DoubleMath.isMathematicalInteger(amount) ? Convert.ToString((long)amount) : Convert.ToString(amount)));
        }