|
查看: 1113|回复: 4
|
vb.net 如何讓2*x = 2x?
[复制链接]
|
|
|
vb.net 如何讓2*x = 2x?
有比較正宗的方式寫嗎?
我只會很笨的方法罷了.. |
|
|
|
|
|
|
|
|
|
|
发表于 3-5-2009 02:13 PM
|
显示全部楼层
什么意识?可以讲详细一点吗?? |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 3-5-2009 05:02 PM
|
显示全部楼层
就是說
比如我在1個textbox裡面打2+5, output會是7
但是如果我打2+x, output 是2+x
打3 * x, output就是3x
不懂.net裡面有沒有方法可以弄到
我是想試試寫可以做differentiation的東西
[ 本帖最后由 mdw1121686 于 3-5-2009 05:08 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
发表于 15-5-2009 06:06 PM
|
显示全部楼层
2+5 = 7 is a mathematical operation.
2 + x = "2+x" you are just concatenating the string.
It is something totally different. Unless there's some where in VB.net to check
the TYPE of your input, and carry out the correct operation.
But I wonder if you actually add a string to a integer...Maybe you can, but the result would be something like 2 + Integer Representation of X in ASCII |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 16-5-2009 02:30 AM
|
显示全部楼层
原帖由 td00164306 于 15-5-2009 06:06 PM 发表 
2+5 = 7 is a mathematical operation.
2 + x = "2+x" you are just concatenating the string.
It is something totally different. Unless there's some where in VB.net to check
the TYPE of your input ...
所以就是想知道vb.net有沒有內建的class可以support咯
沒有就自己寫了.. |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|