点击或拖拽改变大小

RedisClientSetPopAsync 方法

移除并返回集合中的一个随机元素。如果只想获取一个随机元素,但不想该元素从集合中被移除的话,可以使用 SRANDMEMBER 命令。

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

参数

key
类型:SystemString
集合关键字

返回值

类型:TaskOperateResultString
被移除的随机元素。当 key 不存在或 key 是空集时,返回 nil 。
参见