语言

ForEachItem.Contains(Object) 方法

定义

返回一个布尔值,指示集合中的项目是否可以通过索引访问。

public:
 bool Contains(System::Object ^ index);
public bool Contains(object index);
member this.Contains : obj -> bool
Public Function Contains (index As Object) As Boolean

参数

index
Object

集合中要定位对象的 ForEachItemValue 名称、身份、ID或索引。

返回

如果集合可以通过名称、身份、ID 或索引使用 ForEachItem [index] 语法访问,则为 true。 如果索引无法用于从集合中检索物品,则为假。

注解

如果 false,使用语 ForEachItem [index] 法会抛出异常。

适用于