System.Data.SqlTypes.SqlMoney.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            if (IsNull)
            {
                return SQLResource.s_nullString;
            }
            decimal money = ToDecimal();
            // Formatting of SqlMoney: At least two digits after decimal point
            return money.ToString("#0.00##", null);
        }

Usage Example

 public static SqlString ConvertMoneyToCN(SqlMoney money)
 {
     if (money.IsNull)
         return SqlString.Null;
     // 在此处放置代码
     return new SqlString(MoneyConverter.GetCnString(money.ToString()));
 }
All Usage Examples Of System.Data.SqlTypes.SqlMoney::ToString