佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

搜索
查看: 1112|回复: 4

vb.net 如何讓2*x = 2x?

[复制链接]
发表于 3-5-2009 02:02 PM | 显示全部楼层 |阅读模式
vb.net 如何讓2*x = 2x?

有比較正宗的方式寫嗎?
我只會很笨的方法罷了..
回复

使用道具 举报


ADVERTISEMENT

发表于 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咯
沒有就自己寫了..
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT


本周最热论坛帖子本周最热论坛帖子

ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2026 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 27-4-2026 09:26 AM , Processed in 0.069329 second(s), 12 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表