点击或拖拽改变大小

RedisClientIncrementKeyAsync 方法 (String, Int64)

将 key 所储存的值加上增量 increment 。如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCR 操作。 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。

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

参数

key
类型:SystemString
关键字
value
类型:SystemInt64
增量数据

返回值

类型:TaskOperateResultInt64
加上 increment 之后, key 的值。
参见