XenoGuard 4.0 Documentation

Contains

ActionStep Reference » Programming » Dictionary » Contains 

The Dictionary Contains ActionStep checks whether a specific key exists in a created dictionary and stores the Boolean outcome in the Contains field of the result list.


[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. In the Dictionary node, select the Contains ActionStep.

Parameters:

The ActionStep has the following input parameters:


NAME DESCRIPTION
Dictionary The name of the dictionary where the key is to be searched.

Allowed Context Scopes [Local, Global]
Key
The key to be searched within the dictionary.

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum] 

Results:

The ActionStep returns the following results:


NAME
DESCRIPTION
Contains Contains the Boolean response after searching the key in the dictionary.

Allowed Context Scopes [Fixed, Local, Global]

Information The Key parameter can be an empty or a null value for reference types.

Example 1 (Checks the presence of a key in the dictionary):

This example validates if a key is present within the created local Employees dictionary. The Boolean result is passed to the If flow control statement and the value of Text parameter is then output via Message Box.

See other Dictionary operations:

Create
Add
Get
Get At
Count
Iterate
Remove
Remove At
Clear