Foxtable(狐表)用户栏目专家坐堂 → [求助]将数据输出至多行文本框中


  共有2212人关注过本帖树形打印复制链接

主题:[求助]将数据输出至多行文本框中

帅哥哟,离线,有人找我吗?
农村人
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:174 积分:2349 威望:0 精华:0 注册:2015/8/12 15:36:00
[求助]将数据输出至多行文本框中  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By: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)


 回到顶部