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)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 秭归县| 安仁县| 沁源县| 仁怀市| 黎川县| 班玛县| 望江县| 兴宁市| 云龙县| 拉孜县| 长泰县| 长沙市| 尼玛县| 红河县| 武山县| 梅河口市| 阜南县| 明溪县| 泽普县| 亚东县| 中方县| 鄂伦春自治旗| 丘北县| 霍山县| 尼勒克县| 贞丰县| 邵武市| 五指山市| 天等县| 调兵山市| 嵩明县| 嘉荫县| 聂拉木县| 深州市| 安化县| 察隅县| 叶城县| 伊宁县| 永宁县| 洛浦县| 和政县|