加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

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

发布时间:2020-12-16 23:43:56 所属栏目:大数据 来源:网络整理
导读:求救,将C#的一句代码翻译是vb.net的代码! strWidth = (w = 600) ? " width=/ "600/ " " : " "; 这句代码使用vb.net该如何写,请高手指点。 __________________________________________________________________________ strWidth = IIf(w = 600," width=
求救,将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)," ")这个也是对滴! __________________________________________________________________________

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读