SharedData Clear Method (String)C# API
Clears all values which are associated with the specified key from the Shared Data Server.

Namespace: Facilita.Fc.Runtime
Assembly: fc_clr (in fc_clr.dll) Version: 9.5.5.77
Syntax

public void Clear(
	string key
)

Parameters

key
Type: System String
The key against which the data is stored.
Remarks

Removes any list or value associated with the specified key from the Shared Data Server. In this case both the list and value items will be removed. No exception is raised if the key does not exist.

Note Note
Note that it is possible to have both a list (created using AddFirst(String, String) or AddLast(String, String)) and a value created using Set(String, String) both using the same key.

Examples

The following example demonstrates clearing the value stored under "MyKey".
using Facilita.Fc.Runtime;
SharedData sharedData = new SharedData(GetString("sharedDataHost", "localhost"), GetInt("sharedDataPort", 5099));
sharedData.Clear("MyKey");   // remove the list or value for the key
See Also