十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
vb中可以使用+连接字符串,
目前成都创新互联公司已为近千家的企业提供了网站建设、域名、雅安服务器托管、网站托管、企业网站设计、河津网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
也可以使用连接字符串,
建议使用连接字符串,以区别数学运算符+。
dim Userlist() as string
redim Userlist(10)
for i=0 to 10
userlist(i) = i
Next
这样就行
a="@1991@1205@844@3276@1104@747@1069@0.9@4@3@104810571073
"
a=Replace(a,"@",",")
a=Replace(a,"",",")
dim b()
b=split(a,",")
给你一段我曾经写的代码,主要是生成TreeView的节点!有什么不懂的地方你就提!
Public Sub InitializeTreeView(ByVal strvXL As TreeView, ByVal vrsRecordTwo As DataSet)
Dim treBaseNodeOne As TreeNode
Dim treBaseNodeTwo As TreeNode
Dim strDWDM As String
m_rsRecordTwo = g_clsSybase.SelectSC_PD_SBCSB1()
'查找供电局信息
g_clsSybase.SelectRS_ZZJG_ZZJGDMB(m_rsRecordOne)
'添加根节点
Do While m_rsRecordOne.Read
strDWDM = m_rsRecordOne.GetString(0) '获取单位代码
treBaseNodeOne = New TreeNode
treBaseNodeOne.Text = m_rsRecordOne.GetString(1).Trim() '获取单位名称
treBaseNodeOne.Name = m_rsRecordOne.GetString(1)
treBaseNodeOne.Tag = ""
strvXL.Nodes.Add(treBaseNodeOne)
'添加树结构第二层
Dim drsTwo() As DataRow
drsTwo = m_rsRecordTwo.Tables(0).Select("SSDW='" strDWDM "' and SC__XLBM is null")
For Each dr As DataRow In drsTwo
treBaseNodeTwo = New TreeNode
treBaseNodeTwo.Text = dr.Item("XLMC").ToString.Trim
treBaseNodeTwo.Name = dr.Item("XLMC")
treBaseNodeTwo.Tag = dr.Item("XLBM")
treBaseNodeOne.Nodes.Add(treBaseNodeTwo)
Next
Loop
m_rsRecordOne.Close()
End Sub