计算过程中出现错误信息 [英] Error message during calculation
本文介绍了计算过程中出现错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人,请看看我行code的。
Anyone, please take a look at my line of code.
int totalValue = 0;
totalValue = int.Parse(Label9.Text) * int.Parse(Label6.Text);
Label8.Text = **totalValue**;
为什么我收到错误消息?
Why I get error message?
无法int类型隐式转换为字符串。
cannot implicitly convert type int to string.
感谢亚的帮助。
推荐答案
您应该INT转换为字符串。事情是这样的:
You should convert int to string. Something like this:
Label8.Text = totalValue.ToString();
或者这样:
Label8.Text = totalValue + "";
这篇关于计算过程中出现错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文