把雙精度轉換成帶有逗號的數

| |
[不指定 2007/12/13 16:20 | by Else ]

        /// <summary>
        /// 把雙精度轉換成帶有逗號的數
    /// sahu@qq.com
        /// </summary>
        /// <param name="kstr"></param>
        /// <returns></returns>
        public string getDublicToStr(double dbstr)
        {
          string a = dbstr.ToString();
          string[] b = a.Split('.');        
          string f = dbstr.ToString("#,##0")+"."+b[1];    //保證小數點後面相同
      return f;
        }


作者:Else 's Blog
地址:http://www.aixq.com/post/888/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • 中查看更多“把雙精度轉換成帶有逗號的數”相关内容
  • Tags:
    代码 程序 编程 | 评论(1) | 引用(0) | 阅读(1286)
    Else Email Homepage
    2007/12/13 16:22
    public string getDublicToStr(double dbstr)
            {
              string[] b = dbstr.ToString().Split('.');        
              string f = dbstr.ToString("#,##0")+"."+b[1];    //保證小數點後面相同
          return f;
            }

    這樣也不錯
    分页: 1/1 第一页 1 最后页
    发表评论
    表情
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]
                   

    验证码 不区分大小写