last_index_of方法
last_index_of(self, item)
搜索指定的对象并返回整个数组列表中最后一次出现的从零开始的索引。
返回
如果找到,则为整个数组列表中最后一个值出现的从零开始的索引;否则为 -1。
def last_index_of(self, item):
...
范围 | 类型 | 描述 |
---|---|---|
item | VbaProjectReference | 要在数组列表中定位的对象。该值可以为 null。 |
last_index_of(self, item, index)
搜索指定的对象并返回从第一个元素延伸到指定索引的数组列表中元素范围内的最后一个出现的从零开始的索引。
返回
如果找到,则为从第一个元素延伸到 startIndex 的数组列表中元素范围内值最后一次出现的从零开始的索引;否则为 -1。
def last_index_of(self, item, index):
...
范围 | 类型 | 描述 |
---|---|---|
item | VbaProjectReference | 要在数组列表中定位的对象。该值可以为 null。 |
index | int | 向后搜索的从零开始的起始索引。 |
last_index_of(self, item, index, count)
搜索指定的对象并返回包含指定数量的元素并以指定索引结束的数组列表中元素范围内的最后一个出现的从零开始的索引。
返回
System.Collections.Array 列表中元素范围内最后一个 value 出现的索引(从零开始),该列表包含 count 个元素,如果找到则为 startIndex;否则为 -1。
def last_index_of(self, item, index, count):
...
范围 | 类型 | 描述 |
---|---|---|
item | VbaProjectReference | 要在数组列表中定位的对象。该值可以为 null。 |
index | int | 向后搜索的从零开始的起始索引。 |
count | int | 要搜索的部分中的元素数量。 |