Items 方法

返回一个数组,其中包含有 Dictionary 对象中的所有项目。

object.Items

object 应为 Dictionary 对象的名称。

说明

以下代码举例说明如何使用 Items 方法:

Function DicDemo 
  Dim a,d,I,s                  '创建一些变量
Set d = CreateObject("Scripting.Dictionary")
d.Add "a","Athens"          '添加键和项目
d.Add "b","Belgrade"
d.Add "c","Cairo"
a = d.Items                  '获取项目。
For i = 0 To d.Count -1       '循环使用数组。
  s = s & a(i) & "<BR>"       '创建返回字符串。 
 Next
  DicDemo = s
End Function

请参阅

Add 方法(Dictionary) | Exists 方法 | Keys 方法 | Remove 方法 | RemoveAll 方法

应用于: Dictionary 对象

www.holmesian.org
虎的笑话 虎的成语 虎的歇后语