Foxtable(狐表)用户栏目专家坐堂 → [求助]在狐表中这样的功能如何实现


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

主题:[求助]在狐表中这样的功能如何实现

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2013/8/24 20:46:00 [显示全部帖子]

 在命令窗口里执行下面的代码,参考着改一下。

Dim arys() As Integer = {9, 1, 2,3, 0, 4, 4, 5, 5, 6, 7, 8}
Array.sort(arys)
Dim prev As Integer = -999
Dim ls1 As New List(Of Integer)
Dim ls2 As New List(Of Integer)
For Each ary As Integer In arys
    If prev = ary AndAlso ls1.Contains(ary) = False Then
        ls1.Add(ary)
        ls2.Remove(ary)
    End If

    If ls1.Contains(ary) = False Then
        ls2.Add(ary)
        prev = ary
    End If
Next

For Each l As Integer In ls1
    output.Show(l)
Next
For Each l As Integer In ls2
    output.Show(l)
Next

 回到顶部