以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]两个数组如何连接起来 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=189184) |
-- 作者:moseser -- 发布时间:2023/11/15 13:20:00 -- [求助]两个数组如何连接起来 Dim s1() As String = {"选择", "序号", "楼号", "清单编码", "项目名称", "项目特征", "计量单位", "工程量", "不含税单价", "不含税合价", "备注"} Dim s2() As Integer = { 20, 40, 60, 60, 50, 50, 80, 40, 40, 40, 60} 以上两个数组,我想连接起来,做个如下的字符串: ”选择|20|序号40|楼号|60……………………“ 用竖线,一个一个的按照顺序连接起来 |
-- 作者:有点蓝 -- 发布时间:2023/11/15 13:35:00 -- dim s as string for i as integer = 0 to s1.length - 1 s = s & "|" & s1(i) & "|" & s2(i) next msgbox(s)
|