点击或拖拽改变大小

RedisClientReadListByIndex 方法

返回列表 key 中,下标为 index 的元素。下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。如果 key 不是列表类型,返回一个错误。

命名空间:  HslCommunication.Enthernet.Redis
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public OperateResult<string> ReadListByIndex(
	string key,
	long index
)

参数

key
类型:SystemString
关键字
index
类型:SystemInt64
索引位置

返回值

类型:OperateResultString
列表中下标为 index 的元素。如果 index 参数的值不在列表的区间范围内(out of range),返回 nil 。
参见