小编Kei*_*ane的帖子

输入字符串的格式不正确#2

double temp;
temp = (double)Convert.ToDouble("1234.5678");
Run Code Online (Sandbox Code Playgroud)

嘿Lads和女士们,我不能为我的生活弄清楚为什么上面的行不起作用.上面的行给出了一个运行时错误,说明了;

mscorlib.dll中发生了System.FormatException类型的未处理异常

附加信息:输入字符串的格式不正确.

.net c# double parsing

13
推荐指数
4
解决办法
6万
查看次数

在分割之前将类型转换为浮点数.我真的需要哪些演员表,哪些可以删除?为什么?

当用int分隔时,我希望结果是浮点数,我可以得到类似的东西.

float ratio = landscape ? 
              ((float) image.getWidth()) / ((float)image.getHeight()) : 
              ((float)image.getHeight()) / ((float)image.getWidth());
Run Code Online (Sandbox Code Playgroud)

但是我想我不需要每个演员.潜水时有时似乎是自动投入.有什么规则,这是什么时候发生的?

java types casting

3
推荐指数
1
解决办法
139
查看次数

`if`命令中的等式测试返回错误消息"没有这样的文件或目录"

我正在写一个shell脚本,我正在做

if ["$item0" == "$item1"]
then
echo match
fi
Run Code Online (Sandbox Code Playgroud)

但它在运行时会在行上给出错误消息"没有这样的文件或目录".如果有帮助,上面的项目确实包含文件路径.

bash shell if-statement

1
推荐指数
1
解决办法
776
查看次数

标签 统计

.net ×1

bash ×1

c# ×1

casting ×1

double ×1

if-statement ×1

java ×1

parsing ×1

shell ×1

types ×1