NetBox 2.7 使用手册

Exists 方法

如果对象中存在所指定的关键字则返回 true,否则返回 false

语法

isExists = dict.Exists(key)
 

参数

isExists
返回查询结果

dict
一个实例化的对象

key
需要在对象中搜索的 key 值

注释

由于 Dictionary 本身忽略关键字大小写的特性,对于关键字的查询也是忽略大小写的。

示例

下面的例子中两次查询关键字是否存在的调用都将返回 true

Set dict = CreateObject("NetBox.Dictionary")
dict.Add "a", "Athens"
dict.Add "b", "Belgrade"
dict.Add "c", "Cairo"
isExists = dict.Exists("c") 
isExists1 = dict.Exists("C")

应用于

SysInfo 对象 | Dictionary 对象 | Identity 对象
版权所有: 2003- 网络盒子