The Exists attribute function determines if a specific value is represented in the list.
Syntax | ||||
Exists(Value, [UseTextCompare]) | ||||
Return value | ||||
Type |
Description | |||
Boolean |
True if value exists in the list | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Value |
Variant |
ByVal |
The item that must be searched in the list |
Optional |
UseTextCompare |
Boolean |
ByVal |
Specifies whether to search for binary (default) or text content |
Example:
Colors.Add({"red", "blue", "green", "brown", "yellow"})
MsgBox(Colors.Exists("green"))
#Shows True
MsgBox(Colors.Exists("GREEN"))
#Shows False
MsgBox(Colors.Exists("GREEN", True))
#Shows True