以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  二维数组  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=131667)

--  作者:漂亮美眉vszh
--  发布时间:2019/3/4 9:56:00
--  二维数组

老师帮我看下这个二维数据错在哪步?


Dim lists As List(of String())
Dim lists1 As List(of String)
lists1.add("1111")
Dim lists2 As List(of String)
lists2.add("456")
Dim lists3 As List(of String) \'  {"2222","3333","4444"}
lists3.add("222")
lists3.add("333")
lists3.add("444")
lists.AddRange(lists1)
lists.AddRange(lists2)
lists.AddRange(lists3)
For Each li() As String In lists
    For Each l As String In li
        Output.Show(l)
    Next
Next


图片点击可在新窗口打开查看此主题相关图片如下:123456.png
图片点击可在新窗口打开查看


--  作者:有点甜
--  发布时间:2019/3/4 10:02:00
--  
Dim lists As new List(of List(of String))
Dim lists1 As new List(of String)
lists1.add("1111")
Dim lists2 As new List(of String)
lists2.add("456")
Dim lists3 As new List(of String) \'  {"2222","3333","4444"}
lists3.add("222")
lists3.add("333")
lists3.add("444")
lists.Add(lists1)
lists.Add(lists2)
lists.Add(lists3)
For Each li As object In lists
    For Each l As String In li
        Output.Show(l)
    Next
Next