ForEachItem.Contains(Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个布尔值,指示集合中的项目是否可以通过索引访问。
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] 法会抛出异常。