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

vb.net – VB中的“_ _”是什么意思?

发布时间:2020-12-17 00:10:46 所属栏目:大数据 来源:网络整理
导读:我将一些来自旧版VB应用程序的查询语句复制到C#应用程序.我不熟悉VB,虽然看着它让我想要一个VB(维多利亚苦涩).我遇到了像这样构建的查询: *SELECT dp_duckbill_accounts.platypus_no AS duckbill,t_accounts.name AS Name " _ "FROM t_accounts INNER JOIN
我将一些来自旧版VB应用程序的查询语句复制到C#应用程序.我不熟悉VB,虽然看着它让我想要一个VB(维多利亚苦涩).我遇到了像这样构建的查询:
*SELECT dp_duckbill_accounts.platypus_no AS duckbill,t_accounts.name AS Name " & _ 
"FROM t_accounts INNER JOIN dp_duckbill_accounts ON  t_accounts.account_no = dp_duckbill_accounts.account_no " & _
"ORDER BY dp_duckbill_accounts.platypus_no*

“& _”让我暂停.如果只是“&”我会认为它对应于“”在C#连接字符串.但是,世界上哪一个是下划线呢?注意&符号和下划线用空格分隔.

下划线是 line continuation character.它允许连接包括不同的线.像这样:
x = "Hello " & "World"

x = "Hello " & _
    "World"

'this won't compile (pre vb.net 2010,anyway)
    x = "Hello " & 
    "World"

Line Continuation on MSDN

How to: Break and Combine Statements in Code (Visual Basic)

(编辑:李大同)

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

    推荐文章
      热点阅读