如何非指数数字转换成指数数值在C# [英] How to convert non-Exponential numbers to Exponential number in c#

查看:258
本文介绍了如何非指数数字转换成指数数值在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有我们的项目就像从非指数(1234567890.1234567890号皈依到指数(1.234567890E + 10)数的一些计算。

we have some calculation in our project like convertion from non-Exponential("1234567890.1234567890" numbers to Exponential("1.234567890E+10") number.

有对于上述问题的任何解决方案?

is there any solution for above issue?

请帮我从这个问题出来了。

please help me to come out from this problem.

推荐答案

好像你需要使用 Double.Parse (如果你有一个字符串的数量),然后 Double.ToString 与适当的格式说明。例如: number.ToString(E)

It seems like you need to use Double.Parse (if you have the number as a string) and then Double.ToString with the appropriate format specifier. For example: number.ToString("E")

这篇关于如何非指数数字转换成指数数值在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆