[VB.NET]求救,将C#的一句代码翻译是vb.net的代码!

VB.NET源码-156个实用实例哦…… <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
求救,将C#的一句代码翻译是vb.net的代码!
strWidth = (w > = 600) ? " width=/ "600/ " " : " ";
这句代码使用vb.net该如何写,请高手指点。
__________________________________________________________________________
strWidth = IIf(w > = 600, " width= " "600 " " ", " ")
__________________________________________________________________________
strWidth = (w > = 600) ? " width=/ "600/ " " : " "

http://www.kamalpatel.net/ConvertCSharp2VB.aspx
__________________________________________________________________________
楼上不懂就不要在这捣乱了~
__________________________________________________________________________
viena(维也纳N02) 正解
__________________________________________________________________________
不好意思,是从http://www.kamalpatel.net/ConvertCSharp2VB.aspx网上转过来的.
__________________________________________________________________________
strWidth = (w > = 600) ? " width=/ "600/ " " : " ";
等价于
if (w > = 600) then
strWidth = " width=/ "600/ " "
else
strWidth = " "
end if
__________________________________________________________________________
不太会VB
__________________________________________________________________________
我翻译的好像还不对,strWidth = " width=/ "600/ " " 这句有问题,斜杠在C++中表示转义符,不知道翻译到VB中该如何。
__________________________________________________________________________
C++中的 / " 在vb中表示一个 ",应该按如下翻译:


strWidth = (w > = 600) ? " width=/ "600/ " " : " ";
等价于
if (w > = 600) then
strWidth = " width= " "600 " " "
else
strWidth = " "
end if
__________________________________________________________________________
用IIF
IIF( (w > = 600), " width=/ "600/ " ", " ")
__________________________________________________________________________
wzuomin() 是对滴^_^
__________________________________________________________________________
strWidth = IIf(w > = 600, " width= ''600 '' ", " ")
__________________________________________________________________________
IIF( (w > = 600), " width=/ "600/ " ", " ")这个也是对滴!
__________________________________________________________________________
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值