当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > VBS教程:方法-Add 方法(Dictionary)

VBScript
VBS教程:函数-GetLocale 函数
VBS教程:函数-FormatPercent 函数
VBS教程:函数-FormatNumber 函数
VBS教程:函数-FormatDateTime 函数
VBS教程:函数-FormatCurrency 函数
VBS教程:函数-Filter 函数
VBS教程:函数-Exp 函数
VBS教程:函数-Eval 函数
VBS教程:函数-派生数学函数
VBS教程:函数-Day 函数
VBS教程:函数-DateValue 函数
VBS教程:函数-DateSerial 函数
VBS教程:函数-DatePart 函数
VBS教程:函数-DateDiff 函数
VBS教程:函数-DateAdd 函数
VBS教程:函数-Date 函数
VBS教程:函数-CStr 函数
VBS教程:函数-CSng 函数
VBS教程:函数-CreateObject 函数
VBS教程:函数-Cos 函数

VBScript 中的 VBS教程:方法-Add 方法(Dictionary)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 93 ::
收藏到网摘: n/a

Add 方法(Dictionary)

Dictionary 对象添加键和项目对。

object.Add key, item

参数

object

必选项。应为 Dictionary 对象的名称。

key

必选项。与添加的 item 相关的 key

item

必选项。与添加的 key 相关的 item

说明

如果 key 已经存在,则会出现错误。

下面例子举例说明如何使用 Add 方法:

Dim d '创建变量。Set d = CreateObject("Scripting.Dictionary")d.Add "a", "Athens" '添加一些键和项目。d.Add "b", "Belgrade"d.Add "c", "Cairo"