方法一:用两个数组记录内容,一个记录列,一个记录宽度
方法二:用一个字典记录内容
Dim str As String = "部门编号|67|部门名称|100|上级部门编号|85|上级部门名称|105|部门编制人数|94"Dim dic As new Dictionary(Of String, String)Dim ary As String() = str.split("|")For i As Integer = 0 To ary.length-1 Step 2 dic.Add(ary(i), ary(i+1))Next
http://www.foxtable.com/help/topics/1945.htm