获取元素最后出现的位置

列表
Both Server and Client
Both Mobile and PC

获取列表中元素最后出现的位置索引,列表中无目标元素则返回-1

声明

func LastIndexOf(target List<object>, value object) int
go

参数

输入

名称 类型 描述
目标 List 目标列表
Object 元素值

返回

类型 描述
Int 位置索引