我将一些来自旧版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.它允许连接包括不同的线.像这样:
原文链接:https://www.f2er.com/vb/255657.htmlx = "Hello " & "World" x = "Hello " & _ "World" 'this won't compile (pre vb.net 2010,anyway) x = "Hello " & "World"