重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
S_chflag1(n) = Zonename(str_qy) ":" Chname1(str_xd)
我们提供的服务有:成都网站建设、做网站、微信公众号开发、网站优化、网站认证、青神ssl等。为成百上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的青神网站制作公司
字符串拼接尽量不用加号
Dim a As Byte() = New Byte() {1, 2, 3, 4}
Dim b As Byte() = New Byte() {5, 6, 7, 8}
Dim c As Byte() = a.Concat(b).ToArray
'c={1,2,3,4,5,6,7,8}
Private Sub Command1_Click()
a = Array(1, 2, 4, 7, 9, 34, 65, 73, 78, 99, 234, 1234)
b = Array(0, 23, 33, 56, 78, 98, 99, 234, 1000, 9999)
Dim c(30)
i = 0
j = 0
k = 0
While i = UBound(a) And j = UBound(b)
If a(i) b(j) Then
c(k) = a(i)
i = i + 1
Else
c(k) = b(j)
j = j + 1
End If
k = k + 1
Wend
While i UBound(a)
c(k) = a(i)
i = i + 1: k = k + 1
Wend
While j UBound(b)
c(k) = b(j)
j = j + 1: k = k + 1
Wend
Print "原A数组:"
For i = 0 To UBound(a)
Print a(i);
Next i
Print "原B数组:"
For i = 0 To UBound(b)
Print b(i);
Next i
Print "合并后的c数组:"
For i = 0 To k
Print c(i);
If i Mod 15 = 14 Then Print
Next i
End Sub
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ListboxTotalItem As Integer = ListBox1.Items.Count - 1
Dim a(ListboxTotalItem) As String
For i As Integer = 0 To ListboxTotalItem
a(i) = i
Next
Label1.Text = a(5)
End Sub
End Class
-------------
一个Form1
一个Label1
一个Listbox1
一个Button1
在Listbox1中加入10个值
-------------
只是一个演示,其他的要靠自己。