将此数学公式返回到标签? [英] Return this mathmatical formula to a label?
本文介绍了将此数学公式返回到标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
combobox1.text * textbox1.text * Random(0.177-0.325)*(1 + combobox2.text * 0.05)*(1 + combobox3.text * 0.3)
Combobox项目的数字是0-25,例如。
我尝试了什么:
每次都返回0 ...我不知道为什么。我不擅长这些东西。
解决方案
你应该首先将字符串combobox1.text转换成双重字符串:
Convert.ToDouble Method(String)(System) [ ^
combobox1.text * textbox1.text * Random(0.177-0.325) * (1 + combobox2.text * 0.05) * (1 + combobox3.text * 0.3)
Combobox items are numbers 0-25, for example.
What I have tried:
It returns a 0 every time... I am not sure why. I am not good at this stuff.
解决方案
You should convert the string combobox1.text to a double first:
Convert.ToDouble Method (String) (System)[^]
这篇关于将此数学公式返回到标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文