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
vb.net foreach遍历循环
最新推荐文章于 2024-12-12 06:10:13 发布