ISortedList.ContainsValue

Syntax

ContainsValue(Value: Variant): Boolean;

Parameters

Value - value of the element, which existence should be checked.

Description

The ContainsValue method checks if the element exists, which value is passed as a the Value parameter.

Example

Sub Main;

Var

SortList: ISortedList;

i: Integer;

s: String;

Begin

SortList:=New SortedList.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

SortList.Add("Key_"+Math.RandBetweenI(0,100).ToString,"Number "+Math.RandBetweenI(0,100).ToString);

End For;

If SortList.ContainsValue("Number 50") Then

s:="Yes";

Else

s:="No";

End If;

End Sub Main;

After executing the example the "s" variable is set to Yes if generated sorted array contains element with the Number 50 value.

See also:

ISortedList