SharedData GetInt Method C# API
Reads an integer value associated with the specified key in the Shared Data Server.

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

public int GetInt(
	string key,
	int timeout


Type: System String
The key against which the data is stored.
Type: System Int32
The maximum time in milliseconds to wait for a value to become available.

Return Value

Value for key that was created by a previous call to Set(String, String).


Set the timeout parameter to 0 (zero) to prevent blocking. Use -1 to wait forever. If no list of values exists for key, then the Virtual User thread will be suspended and the call will only return (dependent upon timeout) when a value is read from the Shared Data server. If the connection to the Shared Data Server is lost an exception is raised.

Values can be set by calling SetInt(String, Int32).

Note Note
The keys are case-sensitive.


The following example demonstrates reading an integer.
using Facilita.Fc.Runtime;
SharedData sharedData = new SharedData(GetString("sharedDataHost", "localhost"), GetInt("sharedDataPort", 5099));
int value = sharedData.GetInt("AccountNum", 0);
See Also