vb.net foreach遍历循环

版权声明: https://blog.csdn.net/eds124/article/details/85265659
 Dim li As List(Of Integer) = New List(Of Integer)
        li.Add(1234)
        li.Add(234)
        li.Add(2344)
        For Each a As Double In li
            Response.Write(a)
        Next

        Dim dsi As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer)
        dsi.Add("aaa", 234)
        dsi.Add("bbb", 234)
        dsi.Add("ccc", 234)

        For Each l As KeyValuePair(Of String, Integer) In dsi
            Response.Write(l.Key + l.Value.ToString())
        Next

猜你喜欢

转载自blog.csdn.net/eds124/article/details/85265659
今日推荐