首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

vb.net 循环配对输出到listbox上 如何实现

2012-04-04 
vb.net循环配对输出到listbox上 怎么实现比如listbox1的内容是www.baidu.comwww.google.combaidu.comlistb

vb.net 循环配对输出到listbox上 怎么实现
比如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


[解决办法]
关键是这个没什么难度呀,那这压根没思考吧?

VB.NET code
    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 

热点排行