vb.net 循环配对输出到listbox上 怎么实现
来源:岁月联盟
时间:2011-11-12
比如listbox1的内容是
www.baidu.com
www.google.com
baidu.com
listbox2的内容是
/robot.txt
/1.zip
/index.php
我想要实现
linstbox1的每行内容都与listbox2的每行内容配对后输出到listbox3
这个过程要怎么实现
就是listbox3输出
www.biadu.com/robot.txt
www.baidu.com/1.zip
www.baidu.com/index.php
www.google.com/1.zip
www.google.com/robot.txt
www.google.com/index.php
代码:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
For Each w In ListBox1.Items
For Each u In ListBox2.Items
ListBox3.Items.Add(CStr(w) & CStr(u))
Next
Next
End Sub
www.2cto.com
摘自 :Shine的圣天堂-〃敏〃