CouchbaseBucket DecrementAsync Method (String)Couchbase .NET SDK 2.1.0 Documentation
Decrements the value of a key by one as an asynchronous operation. If the key doesn't exist, it will be created and seeded with 1.

Namespace: Couchbase
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax
public Task<IOperationResult<ulong>> DecrementAsync(
	string key
)

Parameters

key
Type: System String
The key to us for the counter.

Return Value

Type: Task IOperationResult UInt64  
The Task TResult  object representing the asynchronous operation.

Implements

IBucket DecrementAsync(String)
Remarks
If the key doesn't exist, the server will respond with the initial value. If not the decremented value will be returned.
See Also