以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]将数据输出至多行文本框中  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=81900)

--  作者:农村人
--  发布时间:2016/3/8 14:44:00
--  [求助]将数据输出至多行文本框中
Dim str() As String = {"1","2","3","4","5","6"}
Dim ls As new List(Of String)
For i As Integer = 1 To 200
    For j As Integer = 1 To 5 \'洗牌次数   ----这个代码主要起到什么作用的呢?
        Dim rnum1 As Integer = Rand.Next(str.Length)
        Dim rnum2 As Integer = Rand.Next(str.Length)
        Dim temp As String = str(rnum1)
        str(rnum1) = str(rnum2)
        str(rnum2) = temp
    Next
    Dim data As String = String.Join("", str)
    If ls.Contains(data) = False Then
        ls.add(data)
        Output.Show(data)   \'如何将数据输出至多行文本框中
    Else
        i -=1
    End If
Next

--  作者:大红袍
--  发布时间:2016/3/8 14:47:00
--  

Dim str() As String = {"1","2","3","4","5","6"}
Dim ls As new List(Of String)
For i As Integer = 1 To 200
    For j As Integer = 1 To 5 \'洗牌次数   ----这个代码主要起到什么作用的呢?
        Dim rnum1 As Integer = Rand.Next(str.Length)
        Dim rnum2 As Integer = Rand.Next(str.Length)
        Dim temp As String = str(rnum1)
        str(rnum1) = str(rnum2)
        str(rnum2) = temp
    Next
    Dim data As String = String.Join("", str)
    If ls.Contains(data) = False Then
        ls.add(data)
    Else
        i -=1
    End If
Next

 

e.form.Conrols("TextBox1").Text = String.Join(vbcrlf, ls.ToArray)