VB.NET 循环遍历listbox并给listbox添加指定字符串后输出

来源:岁月联盟 编辑:exp 时间:2011-11-13

 

listbox1里的内容是

www.baidu.com

www.google.ca

www.yahoo.com

biying.com www.2cto.com

现在需要的结果是输出

http://www.baidu.com

http://www.google.ca

http://www.yahoo.com

http://biying.com

过程其实就是一个遍历加上字符串连接

Dim str1 As Object

        str1 = "http://"

        For Each a In ListBox1.Items

 

            ListBox4.Items.Add(str1 & CStr(a))

        Next

 

 

摘自Shine的圣天堂-〃敏〃