c#字符串轉數字的函數|c#字符串轉數字的無錯函數|c#字符串轉數字的最好函數 
          //字符串轉整數

          public int GetInt(string str)  {

            int tempInt = 0;
            int.TryParse(str,out tempInt);
            return tempInt;

            }

          /字符串轉整數浮點

            public decimal GetDecimal(string str)
            {
            decimal tempDecimal = 0;
            decimal.TryParse(str, out tempDecimal);
            return tempDecimal;

            }

          /字符串轉小樹整數

            public double GetDouble(string str)
            {
            double tempDouble = 0;
            double.TryParse(str, out tempDouble);
            return tempDouble;
            }


          posted on 2009-02-26 10:17 sanmao 閱讀(450) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 拜城县| 特克斯县| 濮阳县| 蓬安县| 中阳县| 石棉县| 富阳市| 太保市| 长海县| 海丰县| 绥德县| 新竹市| 台安县| 江山市| 南丰县| 内江市| 莎车县| 新营市| 泽普县| 巴青县| 玛纳斯县| 阿克陶县| 巩留县| 江北区| 资溪县| 浑源县| 咸阳市| 个旧市| 沅陵县| 安泽县| 拉萨市| 宜州市| 蒙阴县| 和田县| 德化县| 丹棱县| 清苑县| 当涂县| 高要市| 贵定县| 隆德县|