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 閱讀(452) 評論(0)  編輯  收藏

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


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 云霄县| 永平县| 石楼县| 新竹县| 浦县| 东阳市| 山东| 龙陵县| 定远县| 洛浦县| 朝阳县| 弋阳县| 班玛县| 富民县| 清水县| 洱源县| 黄大仙区| 赤水市| 安岳县| 鲁甸县| 舟曲县| 揭东县| 凤城市| 巴彦淖尔市| 定结县| 三原县| 南城县| 彭阳县| 遵义县| 呼玛县| 永兴县| 舒兰市| 基隆市| 海宁市| 万山特区| 太谷县| 京山县| 嘉鱼县| 新野县| 平昌县| 梨树县|