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遍历循环
最新推荐文章于 2025-07-25 23:42:58 发布
本文介绍了一种使用VBA进行数据操作的方法,包括如何创建和操作整数列表及字符串到整数的字典。通过示例代码,展示了如何添加元素到列表中,以及如何遍历并显示列表和字典的内容。

820

被折叠的 条评论
为什么被折叠?



