1
可能重複:
Convert from scientific notation string to float in C#字符串轉換C#
它是有其「2.71e + 006」轉換字符串格式,數字的內建功能或我必須寫我的自定義算法?
可能重複:
Convert from scientific notation string to float in C#字符串轉換C#
它是有其「2.71e + 006」轉換字符串格式,數字的內建功能或我必須寫我的自定義算法?
十進制Parse方法有一個重載可以使用:
decimal d = Decimal.Parse("2.71e+006", System.Globalization.NumberStyles.Float);
你也可以做同樣的雙。